git.iko.soy/typeable/pandoc
on master help sign in
Fixed bug in HTML comment parser.
1fe2848fiddlosopher
src/Text/Pandoc/Readers/HTML.hs+2−2
@@ -346,8 +346,8 @@ rawHtmlBlock' = do notFollowedBy' (htmlTag "/body" <|> htmlTag "/html")
346htmlComment :: GenParser Char st [Char]
346htmlComment :: GenParser Char st [Char]
347htmlComment = try $ do
347htmlComment = try $ do
348 string "<!--"
348 string "<!--"
349− comment <- many ( (satisfy (/='-'))
349+ comment <- many $ noneOf "-"
350− <|> (char '-' >>~ notFollowedBy (try $ char '-' >> char '>')))
350+ <|> try (char '-' >>~ notFollowedBy (char '-' >> char '>'))
351 string "-->"
351 string "-->"
352 return $ "<!--" ++ comment ++ "-->"
352 return $ "<!--" ++ comment ++ "-->"
353
353