git.iko.soy/typeable/pandoc
on master help sign in
Escape non-breaking space in SGML as ' ' instead of
7a04caefiddlosopher
src/Text/Pandoc/Entities.hs+2−1
@@ -87,11 +87,12 @@ escapeSGMLChar x =
87 '<' -> "&lt;"
87 '<' -> "&lt;"
88 '>' -> "&gt;"
88 '>' -> "&gt;"
89 '"' -> "&quot;"
89 '"' -> "&quot;"
90+ '\160' -> "&nbsp;"
90 c -> [c]
91 c -> [c]
91
92
92-- | True if the character needs to be escaped.
93-- | True if the character needs to be escaped.
93needsEscaping :: Char -> Bool
94needsEscaping :: Char -> Bool
94−needsEscaping c = c `elem` "&<>\""
95+needsEscaping c = c `elem` "&<>\"\160"
95
96
96-- | Escape string as needed for SGML. Entity references are not preserved.
97-- | Escape string as needed for SGML. Entity references are not preserved.
97escapeSGMLString :: String -> String
98escapeSGMLString :: String -> String