aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-07-13 15:51:33 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-07-13 15:51:33 -0700
commit178416194617b330b280a5e4a9e894258c0f8b1f (patch)
tree2ef867d9f9518226b11ac2e8be0bacc9a1cb0cc5 /test/command
parent53e30750ba1bd1feeeef6873989e5c52ff8efa51 (diff)
downloadpandoc-178416194617b330b280a5e4a9e894258c0f8b1f.tar.gz
LaTeX reader: Properly handle \providecommand and environment...
They are now ignored if the corresponding command or environment is already defined. Closes #5635.
Diffstat (limited to 'test/command')
-rw-r--r--test/command/5635.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/command/5635.md b/test/command/5635.md
new file mode 100644
index 000000000..72440616f
--- /dev/null
+++ b/test/command/5635.md
@@ -0,0 +1,23 @@
+```
+% pandoc -f latex -t plain
+\providecommand{\test}{foo}
+\providecommand{\test}{bar}
+
+The value is: \test
+^D
+The value is: foo
+```
+
+```
+% pandoc -f latex -t plain
+\provideenvironment{test}{startfoo}{stopfoo}
+\provideenvironment{test}{startbar}{stopbar}
+
+\begin{test}
+Hi
+\end{test}
+^D
+startfoo Hi stopfoo
+```
+
+