aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-05 11:54:06 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-05 11:54:40 -0800
commitcf6cd15c276606c3f33b2f7ce19786fc9ac0e454 (patch)
tree910dfd87c7c395322c165d1616069695f1fb3686 /src/Text/Pandoc/Readers
parentd033fc9d3e2ea572bf00ca0dd04426795fab4c49 (diff)
downloadpandoc-cf6cd15c276606c3f33b2f7ce19786fc9ac0e454.tar.gz
LaTeX reader: skip space before option or argument.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 0e376f1a5..1c224de9e 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -64,7 +64,7 @@ bracketedText openB closeB = do
-- | Returns an option or argument of a LaTeX command.
optOrArg :: GenParser Char st [Char]
-optOrArg = bracketedText '{' '}' <|> bracketedText '[' ']'
+optOrArg = try $ spaces >> (bracketedText '{' '}' <|> bracketedText '[' ']')
-- | True if the string begins with '{'.
isArg :: [Char] -> Bool