git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: improve parsing of `\def` argspec.
commit78ebbc6eef1d0812b1ce6c823f9021d397b79b48 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 14 Oct 2018, 22:50 (8 years ago) parente752a02
1 file changed+4−4
src/Text/Pandoc/Readers/LaTeX.hs+4−4
src/Text/Pandoc/Readers/LaTeX.hs+4−4
@@ -1524,14 +1524,14 @@ defmacro = try $ do
15241524
15251525argspecArg :: PandocMonad m => LP m ArgSpec
15261526argspecArg = do
1527− Tok _ (Arg i) _ <- satisfyTok isArgTok
1527+ Tok _ (Arg i) _ <- withVerbatimMode $ satisfyTok isArgTok
15281528 return $ ArgNum i
15291529
15301530argspecPattern :: PandocMonad m => LP m ArgSpec
1531−argspecPattern =
1531+argspecPattern = withVerbatimMode $
15321532 Pattern <$> many1 (satisfyTok (\(Tok _ toktype' txt) ->
1533− (toktype' == Symbol || toktype' == Word) &&
1534− (txt /= "{" && txt /= "\\" && txt /= "}")))
1533+ (toktype' == Symbol || toktype' == Word) &&
1534+ (txt /= "{" && txt /= "\\" && txt /= "}")))
15351535
15361536newcommand :: PandocMonad m => LP m (Text, Macro)
15371537newcommand = do