diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-05-01 04:17:54 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-05-01 04:17:54 +0000 |
commit | c584e481683cec2dab84e675fbeac0e70d35c44d (patch) | |
tree | 2ba46b02fdf25e9770021e51e196bfd10c2324e0 /src/Text/Pandoc | |
parent | ab100f7c5e5174620e8cff8dc965be68a1f3ba5a (diff) | |
download | pandoc-c584e481683cec2dab84e675fbeac0e70d35c44d.tar.gz |
Markdown reader: change ' ' to '\160' in abbreviations.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1571 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |