LaTeX reader: Fix bug in macro resolution for environments.

This is a regression in pandoc 3.0 that affects environments
with arguments.  Closes #8573.
This commit is contained in:
John MacFarlane
2023-01-23 10:58:44 -08:00
parent 14acf8ee68
commit 23178ec96e
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -216,7 +216,7 @@ newenvironment = do
let result = (name,
Macro GroupScope ExpandWhenUsed argspecs optarg
(bg:startcontents),
Macro GroupScope ExpandWhenUsed argspecs optarg
Macro GroupScope ExpandWhenUsed [] Nothing
(endcontents ++ [eg]))
(do lookupMacro name
case mtype of
+7
View File
@@ -0,0 +1,7 @@
```
% pandoc -f latex -t plain
\newenvironment{myenv}[1]{Open#1}{Close}
\begin{myenv}{x}Hello\end{myenv}
^D
OpenxHelloClose
```