From 1be2ca6c785f0001605ef9347107ae98383feef9 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 6 Jan 2011 00:21:19 -0800 Subject: HTML reader: Fixed bug in htmlTag for comments. --- src/Text/Pandoc/Readers/HTML.hs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Readers/HTML.hs') diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index 9d1aa3922..ae8f0438e 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -480,5 +480,12 @@ htmlTag f = try $ do (next : _) <- getInput >>= return . canonicalizeTags . parseTags guard $ f next -- advance the parser - rendered <- manyTill anyChar (char '>') - return (next, rendered ++ ">") + case next of + TagComment s -> do + count (length s + 4) anyChar + skipMany (satisfy (/='>')) + char '>' + return (next, "") + _ -> do + rendered <- manyTill anyChar (char '>') + return (next, rendered ++ ">") -- cgit v1.2.3