diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-14 22:50:29 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-15 00:37:17 -0700 |
commit | 78ebbc6eef1d0812b1ce6c823f9021d397b79b48 (patch) | |
tree | 251f347df80ac355d01fe44bc3a00586fb9ff648 | |
parent | e752a027f13a0e6c669fa3211824f82daff23058 (diff) | |
download | pandoc-78ebbc6eef1d0812b1ce6c823f9021d397b79b48.tar.gz |
LaTeX reader: improve parsing of `\def` argspec.
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 8 |
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 |