git.iko.soy/typeable/pandoc
on master help sign in
HTML reader: Modified htmlTag for fewer false positives.

A tag must start with `<` followed by `!`,`?`, `/`, or a letter. This makes it more useful in the wikimedia and markdown parsers.

commit887fc14f3d6f2909a2201769e4b8a54a8f6c8793 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 15 Sep 2012, 15:46 (14 years ago) parentc5de3c4
1 file changed+1−1
src/Text/Pandoc/Readers/HTML.hs+1−1
src/Text/Pandoc/Readers/HTML.hs+1−1
@@ -599,7 +599,7 @@ htmlInBalanced f = try $ do
599599-- | Matches a tag meeting a certain condition.
600600htmlTag :: (Tag String -> Bool) -> Parser [Char] st (Tag String, String)
601601htmlTag f = try $ do
602− lookAhead (char '<')
602+ lookAhead $ char '<' >> (oneOf "/!?" <|> letter)
603603 (next : _) <- getInput >>= return . canonicalizeTags . parseTags
604604 guard $ f next
605605 -- advance the parser