aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-02-12 19:29:48 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-02-12 19:29:48 -0800
commiteb0c63b00263263e3dc0f74c0bf19e93c7afeb13 (patch)
treec5128ff74e14da5d11e5eb3b843d18806aec6b17 /src/Text/Pandoc
parentd9322629a36ad50035912ee56df876c345039225 (diff)
downloadpandoc-eb0c63b00263263e3dc0f74c0bf19e93c7afeb13.tar.gz
Avoid an unnecessary withRaw.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 0a66b7f39..2a949cbdc 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1869,9 +1869,12 @@ rawEnv name = do
pos1 <- getPosition
(bs, raw) <- withRaw $ env name blocks
if parseRaw
- then return $ rawBlock "latex"
+ then do
+ (_, raw) <- withRaw $ env name blocks
+ return $ rawBlock "latex"
$ beginCommand <> untokenize raw
else do
+ bs <- env name blocks
report $ SkippedContent beginCommand pos1
pos2 <- getPosition
report $ SkippedContent ("\\end{" <> name <> "}") pos2