diff options
| author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-09-02 11:35:28 -0400 |
|---|---|---|
| committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-09-02 12:28:53 -0400 |
| commit | 3f8d3d844fde31a27643254be69a17128a47d3fe (patch) | |
| tree | dab9eda4c8fa613b02a7dcbcfa26572a8f163e91 /src/Text/Pandoc/XML.hs | |
| parent | c9a631e4ebe9f3d21ee6187348e7e6007353ed15 (diff) | |
Remove TagSoup compat
We already lower-bound tagsoup at 0.13.7, which means we were always
running the compatibility layer (it was conditional on min value
0.13). Better to just use `lookupEntity` from the library directly, and
convert a string to a char if need be.
Diffstat (limited to 'src/Text/Pandoc/XML.hs')
| -rw-r--r-- | src/Text/Pandoc/XML.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/XML.hs b/src/Text/Pandoc/XML.hs index 4cc2141b4..e105aee91 100644 --- a/src/Text/Pandoc/XML.hs +++ b/src/Text/Pandoc/XML.hs @@ -38,7 +38,7 @@ module Text.Pandoc.XML ( escapeCharForXML, import Text.Pandoc.Pretty import Data.Char (ord, isAscii, isSpace) -import Text.Pandoc.Compat.TagSoupEntity (lookupEntity) +import Text.HTML.TagSoup.Entity (lookupEntity) -- | Escape one character as needed for XML. escapeCharForXML :: Char -> String @@ -101,7 +101,7 @@ toEntities (c:cs) fromEntities :: String -> String fromEntities ('&':xs) = case lookupEntity ent' of - Just c -> c : fromEntities rest + Just c -> c ++ fromEntities rest Nothing -> '&' : fromEntities xs where (ent, rest) = case break (\c -> isSpace c || c == ';') xs of (zs,';':ys) -> (zs,ys) |
