mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 01:36:45 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user