aboutsummaryrefslogtreecommitdiff
path: root/test/command/7003.md
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-01-04 14:05:03 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-01-04 14:05:03 -0800
commitea479bf28a4031f408af12ea92d3e19f9a838820 (patch)
tree8e4e717dba081f8b6806230169161648b4e848d5 /test/command/7003.md
parent1ce7db1fa67b6a9f1d354d377e3bfa548d854ee9 (diff)
downloadpandoc-ea479bf28a4031f408af12ea92d3e19f9a838820.tar.gz
LaTeX reader: handle filecontents environment.
Closes #7003.
Diffstat (limited to 'test/command/7003.md')
-rw-r--r--test/command/7003.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/command/7003.md b/test/command/7003.md
new file mode 100644
index 000000000..1f6275943
--- /dev/null
+++ b/test/command/7003.md
@@ -0,0 +1,37 @@
+```
+% pandoc -f latex -t native
+\documentclass{article}
+\usepackage{listings}
+
+\lstset{basicstyle=\ttfamily}
+
+\begin{filecontents*}[overwrite]{example.tex}
+\documentclass{article}
+\begin{document}
+\section{Bar}
+This a Bar section
+\end{document}
+\end{filecontents*}
+
+\begin{document}
+
+\section{With lstlisting environment}
+
+\begin{lstlisting}
+\documentclass{article}
+\begin{document}
+\section{Foo}
+This a Foo section
+\end{document}
+\end{lstlisting}
+
+\section{With lstinputlisting command}
+
+\lstinputlisting{example.tex}
+\end{document}
+^D
+[Header 1 ("with-lstlisting-environment",[],[]) [Str "With",Space,Str "lstlisting",Space,Str "environment"]
+,CodeBlock ("",[],[]) "\\documentclass{article}\n\\begin{document}\n\\section{Foo}\nThis a Foo section\n\\end{document}"
+,Header 1 ("with-lstinputlisting-command",[],[]) [Str "With",Space,Str "lstinputlisting",Space,Str "command"]
+,CodeBlock ("",["latex"],[]) "\\documentclass{article}\n\\begin{document}\n\\section{Bar}\nThis a Bar section\n\\end{document}"]
+```