git.iko.soy/typeable/pandoc
on master help sign in
HTML reader: ignore <?xml..> and <DOCTYPE..> tags.

Previously they were parsed as raw.

commitd71b013841f3c9c8c595591e312a31df16a728cb authorJohn MacFarlane <jgm@berkeley.edu> dateMon 4 Aug 2014, 18:39 (12 years ago) parent2fabdf9
1 file changed+1−1
src/Text/Pandoc/Readers/HTML.hs+1−1
src/Text/Pandoc/Readers/HTML.hs+1−1
@@ -289,7 +289,7 @@ fixPlains inList bs = if any isParaish bs'
289289pRawTag :: TagParser String
290290pRawTag = do
291291 tag <- pAnyTag
292− let ignorable x = x `elem` ["html","head","body"]
292+ let ignorable x = x `elem` ["html","head","body","DOCTYPE","?xml"]
293293 if tagOpen ignorable (const True) tag || tagClose ignorable tag
294294 then return []
295295 else return $ renderTags' [tag]