diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-07-11 01:24:15 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-07-11 01:24:15 +0000 |
commit | 8ed710bc9d771a25e73be2582b379485a3e240dc (patch) | |
tree | eb086d34e2863a3af8e0dfa42f05290c83992cdb /Text/Pandoc/Readers/Markdown.hs | |
parent | 275f9dc94c1ff15e2fafae9e3b5fe7bab2d9c88f (diff) | |
download | pandoc-8ed710bc9d771a25e73be2582b379485a3e240dc.tar.gz |
Treat '\ ' in (extended) markdown as nonbreaking space.
Print nonbreaking space appropriately in each writer (e.g. ~ in LaTeX).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1297 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | Text/Pandoc/Readers/Markdown.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs index 7c4a778fe..c9fbbe2d9 100644 --- a/Text/Pandoc/Readers/Markdown.hs +++ b/Text/Pandoc/Readers/Markdown.hs @@ -733,7 +733,10 @@ escapedChar = do result <- option '\\' $ if stateStrict state then oneOf "\\`*_{}[]()>#+-.!~" else satisfy (not . isAlphaNum) - return $ Str [result] + let result' = if result == ' ' + then '\160' -- '\ ' is a nonbreaking space + else result + return $ Str [result'] ltSign = do st <- getState |