aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Entities.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Entities.hs')
-rw-r--r--src/Text/Pandoc/Entities.hs18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/Text/Pandoc/Entities.hs b/src/Text/Pandoc/Entities.hs
index 696f943a6..e91cf3864 100644
--- a/src/Text/Pandoc/Entities.hs
+++ b/src/Text/Pandoc/Entities.hs
@@ -34,7 +34,6 @@ module Text.Pandoc.Entities (
encodeEntities,
decodeEntities,
escapeSGMLChar,
- stringToSGML,
characterEntity
) where
import Data.Char ( chr, ord )
@@ -115,23 +114,6 @@ decodeEntities str =
Left err -> error $ "\nError: " ++ show err
Right result -> result
--- | Escape string for SGML, preserving entity references.
-stringToSGML :: String -> String
-stringToSGML str =
- let regular = do
- str <- many1 (satisfy (not . needsEscaping))
- return str
- special = do
- notFollowedBy characterEntity
- c <- anyChar
- return $ escapeSGMLChar c
- entity = do
- ent <- manyTill anyChar (char ';')
- return (ent ++ ";") in
- case parse (many (regular <|> special <|> entity)) str str of
- Left err -> error $ "\nError: " ++ show err
- Right result -> concat result
-
entityTable :: [(String, Char)]
entityTable = [
("&quot;", chr 34),