aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-08-04 18:39:39 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-08-04 18:39:39 -0700
commitd71b013841f3c9c8c595591e312a31df16a728cb (patch)
tree40ad45eb0429eea44ecc3b1e79cb30826376d5e0 /src/Text
parent2fabdf9d9376d15b3ed2d0f81d3ce1ebe18c2d5e (diff)
downloadpandoc-d71b013841f3c9c8c595591e312a31df16a728cb.tar.gz
HTML reader: ignore <?xml..> and <DOCTYPE..> tags.
Previously they were parsed as raw.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
index 1ded83ff1..a8df1394c 100644
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -289,7 +289,7 @@ fixPlains inList bs = if any isParaish bs'
pRawTag :: TagParser String
pRawTag = do
tag <- pAnyTag
- let ignorable x = x `elem` ["html","head","body"]
+ let ignorable x = x `elem` ["html","head","body","DOCTYPE","?xml"]
if tagOpen ignorable (const True) tag || tagClose ignorable tag
then return []
else return $ renderTags' [tag]