Fixed bug in HTML comment parser.
Resolves Issue #157. ('try' in the wrong place.)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1605 788f1e2b-df1e-0410-8736-df70ead52e1b
commit1fe28483bddef1a1f8139b1ba8e8129fa14090e6
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateTue 21 Jul 2009, 08:02 (17 years ago)
parentadabf14
src/Text/Pandoc/Readers/HTML.hs+2−2
@@ -346,8 +346,8 @@ rawHtmlBlock' = do notFollowedBy' (htmlTag "/body" <|> htmlTag "/html")
346346htmlComment :: GenParser Char st [Char]
347347htmlComment = try $ do
348348 string "<!--"
349− comment <- many ( (satisfy (/='-'))
350− <|> (char '-' >>~ notFollowedBy (try $ char '-' >> char '>')))
349+ comment <- many $ noneOf "-"
350+ <|> try (char '-' >>~ notFollowedBy (char '-' >> char '>'))
351351 string "-->"
352352 return $ "<!--" ++ comment ++ "-->"
353353