diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-17 03:40:28 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-17 03:40:28 +0000 |
commit | 7a04caeea898fa3d0a19a48cdafc49596ecf8c04 (patch) | |
tree | 2e53570966b0a808c0c01c0ef24a5a1fd16a26f3 /src/Text | |
parent | 1855af4be596e464cac158a4c378af350198506e (diff) | |
download | pandoc-7a04caeea898fa3d0a19a48cdafc49596ecf8c04.tar.gz |
Escape non-breaking space in SGML as ' ' instead of
printing a unicode non-breaking space, which is
hard to distinguish visually from a regular space.
(Resolves issue #3.)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@540 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Entities.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Entities.hs b/src/Text/Pandoc/Entities.hs index 0b77ea334..eaa1cd158 100644 --- a/src/Text/Pandoc/Entities.hs +++ b/src/Text/Pandoc/Entities.hs @@ -87,11 +87,12 @@ escapeSGMLChar x = '<' -> "<" '>' -> ">" '"' -> """ + '\160' -> " " c -> [c] -- | True if the character needs to be escaped. needsEscaping :: Char -> Bool -needsEscaping c = c `elem` "&<>\"" +needsEscaping c = c `elem` "&<>\"\160" -- | Escape string as needed for SGML. Entity references are not preserved. escapeSGMLString :: String -> String |