From 8ed710bc9d771a25e73be2582b379485a3e240dc Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Fri, 11 Jul 2008 01:24:15 +0000 Subject: 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 --- Text/Pandoc/Readers/Markdown.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Text/Pandoc/Readers') 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 -- cgit v1.2.3