aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-14 22:50:29 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-15 00:37:17 -0700
commit78ebbc6eef1d0812b1ce6c823f9021d397b79b48 (patch)
tree251f347df80ac355d01fe44bc3a00586fb9ff648 /src/Text
parente752a027f13a0e6c669fa3211824f82daff23058 (diff)
downloadpandoc-78ebbc6eef1d0812b1ce6c823f9021d397b79b48.tar.gz
LaTeX reader: improve parsing of `\def` argspec.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs8
1 files changed, 4 insertions, 4 deletions
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