From cf6cd15c276606c3f33b2f7ce19786fc9ac0e454 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 5 Jan 2011 11:54:06 -0800 Subject: LaTeX reader: skip space before option or argument. --- src/Text/Pandoc/Readers/LaTeX.hs | 2 +- 1 file changed, 1 insertion(+), 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 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 -- cgit v1.2.3