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
commit7a04caeea898fa3d0a19a48cdafc49596ecf8c04
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateSat 17 Feb 2007, 03:40 (20 years ago)
parent1855af4
src/Text/Pandoc/Entities.hs+2−1
@@ -87,11 +87,12 @@ escapeSGMLChar x =
8787 '<' -> "<"
8888 '>' -> ">"
8989 '"' -> """
90+ '\160' -> " "
9091 c -> [c]
9192
9293-- | True if the character needs to be escaped.
9394needsEscaping :: Char -> Bool
94−needsEscaping c = c `elem` "&<>\""
95+needsEscaping c = c `elem` "&<>\"\160"
9596
9697-- | Escape string as needed for SGML. Entity references are not preserved.
9798escapeSGMLString :: String -> String