aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-07-10 19:07:40 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-07-10 19:07:40 -0700
commitc83b578f58df11354769eac945aaab456f416a39 (patch)
tree2c7c6dba6ef1ce84ed0dba3087d9376a08852a9c /src/Text/Pandoc
parent4134dad500f6cb360a9ceb957e0c5ec2ec59b2a8 (diff)
downloadpandoc-c83b578f58df11354769eac945aaab456f416a39.tar.gz
LaTeX reader: Gobble option & space after linebreak \\[10pt].
Diffstat (limited to 'src/Text/Pandoc')
-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 232f1793e..a4157da2f 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -805,7 +805,11 @@ nonbreakingSpace = char '~' >> return (Str "\160")
-- hard line break
linebreak :: GenParser Char st Inline
-linebreak = try (string "\\\\") >> return LineBreak
+linebreak = try $ do
+ string "\\\\"
+ optional $ bracketedText '[' ']' -- e.g. \\[10pt]
+ spaces
+ return LineBreak
str :: GenParser Char st Inline
str = many1 (noneOf specialChars) >>= return . Str