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
This commit is contained in:
fiddlosopher 2009-07-21 08:02:03 +00:00
parent adabf14a5f
commit 1fe28483bd

View file

@ -346,8 +346,8 @@ rawHtmlBlock' = do notFollowedBy' (htmlTag "/body" <|> htmlTag "/html")
htmlComment :: GenParser Char st [Char]
htmlComment = try $ do
string "<!--"
comment <- many ( (satisfy (/='-'))
<|> (char '-' >>~ notFollowedBy (try $ char '-' >> char '>')))
comment <- many $ noneOf "-"
<|> try (char '-' >>~ notFollowedBy (char '-' >> char '>'))
string "-->"
return $ "<!--" ++ comment ++ "-->"