aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-09-02 18:48:37 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-09-02 18:48:37 -0700
commit5e708eb8ce4bb4325b009ac37a5986517d6b9290 (patch)
treec5a67838048f670463f86bee2e8826352b9057db /src/Text/Pandoc/Readers/LaTeX
parent3fac27b26b825a36304169c698e422801605de2c (diff)
downloadpandoc-5e708eb8ce4bb4325b009ac37a5986517d6b9290.tar.gz
LaTeX reader: properly handle optional arguments for macros.
Closes #5682.
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Parsing.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
index b9114d34c..547b855e2 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
@@ -448,7 +448,7 @@ doMacros' n inp = do
Nothing -> getargs M.empty argspecs
Just o -> do
x <- option o bracketedToks
- getargs (M.singleton 1 x) argspecs
+ getargs (M.singleton 1 x) $ drop 1 argspecs
rest <- getInput
return (args, rest)
lstate <- getState