diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 6792a1935..764a146ac 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -105,16 +105,10 @@ wrappedMarkdown opts sect = do chunks' <- mapM (inlineListToMarkdown opts) chunks return $ fsep chunks' --- | Escape nonbreaking space as entity -escapeNbsp "" = "" -escapeNbsp ('\160':xs) = " " ++ escapeNbsp xs -escapeNbsp str = - let (a,b) = break (=='\160') str in - a ++ escapeNbsp b - -- | Escape special characters for Markdown. escapeString :: String -> String -escapeString = backslashEscape "`<\\*_^" . escapeNbsp +escapeString = backslashEscape "`<\\*_^" . + escapeCharAsString '\160' " " -- | Convert bibliographic information into Markdown header. metaToMarkdown :: WriterOptions -> Meta -> State WriterState Doc |