git.iko.soy/typeable/pandoc
on master help sign in
Work around tagsoup bug - not allowing uppercase x in hex entities.
5884ff6John MacFarlane
src/Text/Pandoc/Parsing.hs+1
@@ -574,6 +574,7 @@ characterReference = try $ do
574 char '&'
574 char '&'
575 ent <- many1Till nonspaceChar (char ';')
575 ent <- many1Till nonspaceChar (char ';')
576 let ent' = case ent of
576 let ent' = case ent of
577+ '#':'X':xs -> '#':'x':xs -- workaround tagsoup bug
577 '#':_ -> ent
578 '#':_ -> ent
578 _ -> ent ++ ";"
579 _ -> ent ++ ";"
579 case lookupEntity ent' of
580 case lookupEntity ent' of
src/Text/Pandoc/XML.hs+1
@@ -107,6 +107,7 @@ fromEntities ('&':xs) =
107 (zs,';':ys) -> (zs,ys)
107 (zs,';':ys) -> (zs,ys)
108 (zs, ys) -> (zs,ys)
108 (zs, ys) -> (zs,ys)
109 ent' = case ent of
109 ent' = case ent of
110+ '#':'X':xs -> '#':'x':xs -- workaround tagsoup bug
110 '#':_ -> ent
111 '#':_ -> ent
111 _ -> ent ++ ";"
112 _ -> ent ++ ";"
112
113