LaTeX reader: skip space before option or argument.

This commit is contained in:
John MacFarlane 2011-01-05 11:54:06 -08:00
parent d033fc9d3e
commit cf6cd15c27

View file

@ -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