git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: skip space before option or argument.
cf6cd15John MacFarlane
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -64,7 +64,7 @@ bracketedText openB closeB = do
64
64
65-- | Returns an option or argument of a LaTeX command.
65-- | Returns an option or argument of a LaTeX command.
66optOrArg :: GenParser Char st [Char]
66optOrArg :: GenParser Char st [Char]
67−optOrArg = bracketedText '{' '}' <|> bracketedText '[' ']'
67+optOrArg = try $ spaces >> (bracketedText '{' '}' <|> bracketedText '[' ']')
68
68
69-- | True if the string begins with '{'.
69-- | True if the string begins with '{'.
70isArg :: [Char] -> Bool
70isArg :: [Char] -> Bool