From 78ebbc6eef1d0812b1ce6c823f9021d397b79b48 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sun, 14 Oct 2018 22:50:29 -0700
Subject: LaTeX reader: improve parsing of `\def` argspec.

---
 src/Text/Pandoc/Readers/LaTeX.hs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/Text')

diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 1bdcabfbf..d299b55f8 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1524,14 +1524,14 @@ defmacro = try $ do
 
 argspecArg :: PandocMonad m => LP m ArgSpec
 argspecArg = do
-  Tok _ (Arg i) _ <- satisfyTok isArgTok
+  Tok _ (Arg i) _ <- withVerbatimMode $ satisfyTok isArgTok
   return $ ArgNum i
 
 argspecPattern :: PandocMonad m => LP m ArgSpec
-argspecPattern =
+argspecPattern = withVerbatimMode $
   Pattern <$> many1 (satisfyTok (\(Tok _ toktype' txt) ->
-                                    (toktype' == Symbol || toktype' == Word) &&
-                                    (txt /= "{" && txt /= "\\" && txt /= "}")))
+                              (toktype' == Symbol || toktype' == Word) &&
+                              (txt /= "{" && txt /= "\\" && txt /= "}")))
 
 newcommand :: PandocMonad m => LP m (Text, Macro)
 newcommand = do
-- 
cgit v1.2.3