From 178416194617b330b280a5e4a9e894258c0f8b1f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 13 Jul 2019 15:51:33 -0700 Subject: LaTeX reader: Properly handle \providecommand and environment... They are now ignored if the corresponding command or environment is already defined. Closes #5635. --- test/command/5635.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/command/5635.md (limited to 'test/command') 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 +``` + + -- cgit v1.2.3