mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-01 21:25:48 +00:00
Using a code block containing `\end{verbatim}`, one could
inject raw TeX into a LaTeX document even when `raw_tex`
is disabled. Thanks to Augustin Laville for noticing the
bug.
Closes #7497.
38 lines
633 B
Markdown
38 lines
633 B
Markdown
````
|
|
% pandoc -f markdown-raw_tex -t latex
|
|
```
|
|
\end{verbatim}
|
|
\LaTeX
|
|
\begin{verbatim}
|
|
```
|
|
^D
|
|
\begin{Shaded}
|
|
\begin{Highlighting}[]
|
|
\NormalTok{\textbackslash{}end\{verbatim\}}
|
|
\NormalTok{\textbackslash{}LaTeX}
|
|
\NormalTok{\textbackslash{}begin\{verbatim\}}
|
|
\end{Highlighting}
|
|
\end{Shaded}
|
|
````
|
|
|
|
````
|
|
% pandoc -f markdown-raw_tex -t latex
|
|
hi[^1]
|
|
|
|
[^1]:
|
|
```
|
|
\end{Verbatim}
|
|
\LaTeX
|
|
\begin{Verbatim}
|
|
```
|
|
^D
|
|
hi\footnote{\begin{Shaded}
|
|
\begin{Highlighting}[]
|
|
\NormalTok{\textbackslash{}end\{Verbatim\}}
|
|
\NormalTok{\textbackslash{}LaTeX}
|
|
\NormalTok{\textbackslash{}begin\{Verbatim\}}
|
|
\end{Highlighting}
|
|
\end{Shaded}
|
|
}
|
|
````
|