aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs2
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Parsing.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 4e006fa8a..76a48a364 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1591,7 +1591,7 @@ newcommand = do
(symbol '{' *> spaces *> anyControlSeq <* spaces <* symbol '}')
spaces
numargs <- option 0 $ try bracketedNum
- let argspecs = map (\i -> ArgNum i) [1..numargs]
+ let argspecs = map ArgNum [1..numargs]
spaces
optarg <- option Nothing $ Just <$> try bracketedToks
spaces
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