From c584e481683cec2dab84e675fbeac0e70d35c44d Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Fri, 1 May 2009 04:17:54 +0000 Subject: Markdown reader: change ' ' to '\160' in abbreviations. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1571 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/Markdown.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 6300d048a..7e3b1afc3 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1039,13 +1039,14 @@ str :: GenParser Char ParserState Inline str = do result <- many1 strChar state <- getState + let spacesToNbr = map (\c -> if c == ' ' then '\160' else c) if stateSmart state then case likelyAbbrev result of [] -> return $ Str result xs -> choice (map (\x -> try (string x >> char ' ' >> notFollowedBy spaceChar >> - return (Str $ result ++ x ++ "\160"))) xs) + return (Str $ result ++ spacesToNbr x ++ "\160"))) xs) <|> (return $ Str result) else return $ Str result -- cgit v1.2.3