aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-01-28 21:32:30 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2020-01-28 21:32:30 -0800
commite6399d162aedf2bfe2b183cd4c7310521dafe842 (patch)
tree379812fb22335c850f0cc3b330e01080ec346c68 /src/Text/Pandoc/Readers
parent34eba446a02f4370d89e33f4f5a47b0cdb6bbfee (diff)
downloadpandoc-e6399d162aedf2bfe2b183cd4c7310521dafe842.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs2
1 files changed, 1 insertions, 1 deletions
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