git.iko.soy/typeable/pandoc
on master help sign in
Work around tagsoup bug - not allowing uppercase x in hex entities.

Issue submitted at tagsoup.

commit5884ff6994e739bd46be4914adcb7fc9cc093056 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 8 Jan 2016, 17:32 (11 years ago) parent12a5bd3
2 files changed+2
src/Text/Pandoc/Parsing.hs+1 src/Text/Pandoc/XML.hs+1
src/Text/Pandoc/Parsing.hs+1
@@ -574,6 +574,7 @@ characterReference = try $ do
574574 char '&'
575575 ent <- many1Till nonspaceChar (char ';')
576576 let ent' = case ent of
577+ '#':'X':xs -> '#':'x':xs -- workaround tagsoup bug
577578 '#':_ -> ent
578579 _ -> ent ++ ";"
579580 case lookupEntity ent' of
src/Text/Pandoc/XML.hs+1
@@ -107,6 +107,7 @@ fromEntities ('&':xs) =
107107 (zs,';':ys) -> (zs,ys)
108108 (zs, ys) -> (zs,ys)
109109 ent' = case ent of
110+ '#':'X':xs -> '#':'x':xs -- workaround tagsoup bug
110111 '#':_ -> ent
111112 _ -> ent ++ ";"
112113