From c27ce1e70e72302d6cdc05ad59f45d0d04bda363 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 14 Aug 2018 00:03:55 -0700 Subject: 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`. --- test/command/4768.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/command/4768.md (limited to 'test') 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 +``` -- cgit v1.2.3