git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: change ' ' to '\160' in abbreviations.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1571 788f1e2b-df1e-0410-8736-df70ead52e1b

commitc584e481683cec2dab84e675fbeac0e70d35c44d authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 1 May 2009, 04:17 (17 years ago) parentab100f7
1 file changed+2−1
src/Text/Pandoc/Readers/Markdown.hs+2−1
src/Text/Pandoc/Readers/Markdown.hs+2−1
@@ -1039,13 +1039,14 @@ str :: GenParser Char ParserState Inline
10391039str = do
10401040 result <- many1 strChar
10411041 state <- getState
1042+ let spacesToNbr = map (\c -> if c == ' ' then '\160' else c)
10421043 if stateSmart state
10431044 then case likelyAbbrev result of
10441045 [] -> return $ Str result
10451046 xs -> choice (map (\x ->
10461047 try (string x >> char ' ' >>
10471048 notFollowedBy spaceChar >>
1048− return (Str $ result ++ x ++ "\160"))) xs)
1049+ return (Str $ result ++ spacesToNbr x ++ "\160"))) xs)
10491050 <|> (return $ Str result)
10501051 else return $ Str result
10511052