aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-15 09:46:15 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-15 09:46:15 -0700
commit68ec8380149a314f261e25ca60c6f65b0436b9e4 (patch)
treee0ccdd4b46f3c9b9f612d15ebbe646bf84a39820 /src/Text/Pandoc
parent41663e9eef8929ee8e86250e639b47053254e871 (diff)
downloadpandoc-68ec8380149a314f261e25ca60c6f65b0436b9e4.tar.gz
LaTeX reader: Fix small regression in pattern argumnents...
introduced in last commit.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Parsing.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
index 8c4f359f7..74305b824 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
@@ -425,7 +425,8 @@ doMacros' n inp = do
getargs argmap rest
getargs argmap (ArgNum i : Pattern toks : rest) =
try $ do
- x <- mconcat <$> manyTill bracedOrToken (matchPattern toks)
+ x <- mconcat <$> manyTill (braced <|> ((:[]) <$> anyTok))
+ (matchPattern toks)
getargs (M.insert i x argmap) rest
getargs argmap (ArgNum i : rest) = do
x <- try $ spaces >> bracedOrToken