aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Text/Pandoc/Readers/Markdown.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs
index d49dd8e04..e9f19e817 100644
--- a/Text/Pandoc/Readers/Markdown.hs
+++ b/Text/Pandoc/Readers/Markdown.hs
@@ -864,7 +864,10 @@ math = (mathDisplay >>= return . Math DisplayMath)
<|> (mathInline >>= return . Math InlineMath)
mathDisplay :: GenParser Char ParserState String
-mathDisplay = try $ char '$' >> mathInline >>~ char '$' >>~ notFollowedBy digit
+mathDisplay = try $ do
+ failIfStrict
+ string "$$"
+ many1Till (noneOf "\n" <|> (newline >>~ notFollowedBy' blankline)) (try $ string "$$")
mathInline :: GenParser Char ParserState String
mathInline = try $ do