From e6399d162aedf2bfe2b183cd4c7310521dafe842 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 28 Jan 2020 21:32:30 -0800 Subject: Added a try that was needed for the commit fc78be1. The intent of that commit was to parse unknown LaTeX enivronments as verbatim if they can't be parsed normally, avoiding crashes on environments that allow unescaped underscores and the like. But the fix didn't completely work: it worked for raw TeX in markdown but not when reading LaTeX. This change fixes that. See #6034. Closes #6093. --- src/Text/Pandoc/Readers/LaTeX.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index c7c778193..27d166f63 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -1942,7 +1942,7 @@ environment = try $ do if M.member name (inlineEnvironments :: M.Map Text (LP PandocPure Inlines)) then mzero - else rawEnv name <|> rawVerbEnv name + else try (rawEnv name) <|> rawVerbEnv name env :: PandocMonad m => Text -> LP m a -> LP m a env name p = p <* end_ name -- cgit v1.2.3