git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: recognize nonbreaking space ~.

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

commitdf6274e3d79877deb2e6a7aa27d29f21a31548c7 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 13 Mar 2010, 04:30 (17 years ago) parent3b9be92
1 file changed+5−1
src/Text/Pandoc/Readers/LaTeX.hs+5−1
src/Text/Pandoc/Readers/LaTeX.hs+5−1
@@ -448,6 +448,7 @@ inline = choice [ str
448448 , footnote
449449 , linebreak
450450 , accentedChar
451+ , nonbreakingSpace
451452 , specialChar
452453 , rawLaTeXInline
453454 , escapedChar
@@ -671,7 +672,10 @@ strong = try (string "\\textbf{") >> manyTill inline (char '}') >>=
671672 return . Strong
672673
673674whitespace :: GenParser Char st Inline
674−whitespace = many1 (oneOf "~ \t") >> return Space
675+whitespace = many1 (oneOf " \t") >> return Space
676+
677+nonbreakingSpace :: GenParser Char st Inline
678+nonbreakingSpace = char '~' >> return (Str "\160")
675679
676680-- hard line break
677681linebreak :: GenParser Char st Inline