diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/HTML.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/HTML.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index 65e512b5e..c988c68d2 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -346,7 +346,9 @@ rawHtmlBlock' = do notFollowedBy' (htmlTag "/body" <|> htmlTag "/html") htmlComment :: GenParser Char st [Char] htmlComment = try $ do string "<!--" - comment <- manyTill anyChar (try (string "-->")) + comment <- many ( (satisfy (/='-')) + <|> (char '-' >>~ notFollowedBy (try $ char '-' >> char '>'))) + string "-->" return $ "<!--" ++ comment ++ "-->" -- |