aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-13 04:30:27 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-13 04:30:27 +0000
commitdf6274e3d79877deb2e6a7aa27d29f21a31548c7 (patch)
treecf9bc7ea874c32d55ce10bfb3dccc5b918176584 /src/Text/Pandoc/Readers/LaTeX.hs
parent3b9be92492cca7573f9ce79dff099b4d2fa3c56c (diff)
downloadpandoc-df6274e3d79877deb2e6a7aa27d29f21a31548c7.tar.gz
LaTeX reader: recognize nonbreaking space ~.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1884 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs6
1 files changed, 5 insertions, 1 deletions
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