aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-08-13 10:41:36 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-08-13 10:41:36 -0700
commite8d7d157fdbddbe2d08688ac43c980e45495574e (patch)
treec30fa6c3dff726433d0df6e826400382037cf0f8
parent649133fe5ecf6a2408eeb3c01bc654f71754a590 (diff)
downloadpandoc-e8d7d157fdbddbe2d08688ac43c980e45495574e.tar.gz
LaTeX reader: proper implicit grouping around environment macros.
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Macro.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Macro.hs b/src/Text/Pandoc/Readers/LaTeX/Macro.hs
index c5704c8ad..d40277eb5 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Macro.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Macro.hs
@@ -212,7 +212,8 @@ newenvironment = do
let result = (name,
Macro GroupScope ExpandWhenUsed argspecs optarg
(bg:startcontents),
- Macro GroupScope ExpandWhenUsed [] Nothing (eg:endcontents))
+ Macro GroupScope ExpandWhenUsed [] Nothing
+ (endcontents ++ [eg]))
(do lookupMacro name
case mtype of
"provideenvironment" -> return Nothing