From df6274e3d79877deb2e6a7aa27d29f21a31548c7 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 13 Mar 2010 04:30:27 +0000 Subject: LaTeX reader: recognize nonbreaking space ~. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1884 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/LaTeX.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Readers/LaTeX.hs') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 1a5c37e7a..72549a293 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -448,6 +448,7 @@ inline = choice [ str , footnote , linebreak , accentedChar + , nonbreakingSpace , specialChar , rawLaTeXInline , escapedChar @@ -671,7 +672,10 @@ strong = try (string "\\textbf{") >> manyTill inline (char '}') >>= return . Strong whitespace :: GenParser Char st Inline -whitespace = many1 (oneOf "~ \t") >> return Space +whitespace = many1 (oneOf " \t") >> return Space + +nonbreakingSpace :: GenParser Char st Inline +nonbreakingSpace = char '~' >> return (Str "\160") -- hard line break linebreak :: GenParser Char st Inline -- cgit v1.2.3