git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: relax spacing rules for $$ in display math.
996e1adfiddlosopher
Text/Pandoc/Readers/Markdown.hs+4−1
@@ -864,7 +864,10 @@ math = (mathDisplay >>= return . Math DisplayMath)
864 <|> (mathInline >>= return . Math InlineMath)
864 <|> (mathInline >>= return . Math InlineMath)
865
865
866mathDisplay :: GenParser Char ParserState String
866mathDisplay :: GenParser Char ParserState String
867−mathDisplay = try $ char '$' >> mathInline >>~ char '$' >>~ notFollowedBy digit
867+mathDisplay = try $ do
868+ failIfStrict
869+ string "$$"
870+ many1Till (noneOf "\n" <|> (newline >>~ notFollowedBy' blankline)) (try $ string "$$")
868
871
869mathInline :: GenParser Char ParserState String
872mathInline :: GenParser Char ParserState String
870mathInline = try $ do
873mathInline = try $ do