diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-08-13 11:10:11 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-08-13 11:27:04 -0700 |
commit | 418155aa9516170e3fd661aa537e5ee719d73ef7 (patch) | |
tree | 3b34c5954d7f3e2d0d7260b94fa49b0b537c99f3 /test/command | |
parent | e8d7d157fdbddbe2d08688ac43c980e45495574e (diff) | |
download | pandoc-418155aa9516170e3fd661aa537e5ee719d73ef7.tar.gz |
Fix raw LaTeX injection issue (LaTeX writer).
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.
Diffstat (limited to 'test/command')
-rw-r--r-- | test/command/7497.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/command/7497.md b/test/command/7497.md new file mode 100644 index 000000000..4b80bf267 --- /dev/null +++ b/test/command/7497.md @@ -0,0 +1,37 @@ +```` +% 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} +} +```` |