From 68ec8380149a314f261e25ca60c6f65b0436b9e4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 15 Oct 2018 09:46:15 -0700 Subject: LaTeX reader: Fix small regression in pattern argumnents... introduced in last commit. --- src/Text/Pandoc/Readers/LaTeX/Parsing.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text') 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 -- cgit v1.2.3