aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-08-14 00:03:55 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-08-14 00:03:55 -0700
commitc27ce1e70e72302d6cdc05ad59f45d0d04bda363 (patch)
tree9d36c953c6edc3b425930d0c23cb3d73efa3d856 /test/command
parent919c50162ccc3d7a347a9427ca23887e54e8a333 (diff)
downloadpandoc-c27ce1e70e72302d6cdc05ad59f45d0d04bda363.tar.gz
LaTeX reader: handle parameter patterns for `\def`.
For example: `\def\foo#1[#2]{#1 and #2}`. Closes #4768. Also fixes #4771. API change: in Text.Pandoc.Readers.LaTeX.Types, new type ArgSpec added. Second parameter of Macro constructor is now `[ArgSpec]` instead of `Int`.
Diffstat (limited to 'test/command')
-rw-r--r--test/command/4768.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/command/4768.md b/test/command/4768.md
new file mode 100644
index 000000000..60d407d8b
--- /dev/null
+++ b/test/command/4768.md
@@ -0,0 +1,7 @@
+```
+% pandoc -f latex -t plain
+\def\foo#1!#2!#3{#1 or #2 and #3}
+\foo aa!bbb bbb!{ccc}
+^D
+aa or bbb bbb and ccc
+```