diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2017-03-04 13:03:41 +0100 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2017-03-04 13:03:41 +0100 |
| commit | e256c8ce1778ff6fbb2e8d59556d48fb3c53393d (patch) | |
| tree | 3527320cd3fd205a00a733ddbe46917638253034 /src/Text/Pandoc/XML.hs | |
| parent | 0edfbf1478950d645ece19ced0156771ba16ebb6 (diff) | |
Stylish-haskell automatic formatting changes.
Diffstat (limited to 'src/Text/Pandoc/XML.hs')
| -rw-r--r-- | src/Text/Pandoc/XML.hs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Text/Pandoc/XML.hs b/src/Text/Pandoc/XML.hs index e105aee91..d7fdc4278 100644 --- a/src/Text/Pandoc/XML.hs +++ b/src/Text/Pandoc/XML.hs @@ -36,18 +36,18 @@ module Text.Pandoc.XML ( escapeCharForXML, toEntities, fromEntities ) where -import Text.Pandoc.Pretty -import Data.Char (ord, isAscii, isSpace) +import Data.Char (isAscii, isSpace, ord) import Text.HTML.TagSoup.Entity (lookupEntity) +import Text.Pandoc.Pretty -- | Escape one character as needed for XML. escapeCharForXML :: Char -> String escapeCharForXML x = case x of - '&' -> "&" - '<' -> "<" - '>' -> ">" - '"' -> """ - c -> [c] + '&' -> "&" + '<' -> "<" + '>' -> ">" + '"' -> """ + c -> [c] -- | Escape string as needed for XML. Entity references are not preserved. escapeStringForXML :: String -> String @@ -108,8 +108,8 @@ fromEntities ('&':xs) = (zs, ys) -> (zs,ys) ent' = case ent of '#':'X':ys -> '#':'x':ys -- workaround tagsoup bug - '#':_ -> ent - _ -> ent ++ ";" + '#':_ -> ent + _ -> ent ++ ";" fromEntities (x:xs) = x : fromEntities xs fromEntities [] = [] |
