From 724fd655e79a24b5150f0253325d9653f59e9631 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 2 Nov 2019 09:40:08 -0700 Subject: [PATCH] Add test case for #5845. --- test/command/5845.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/command/5845.md diff --git a/test/command/5845.md b/test/command/5845.md new file mode 100644 index 000000000..aa09b08e7 --- /dev/null +++ b/test/command/5845.md @@ -0,0 +1,16 @@ +``` +% pandoc -t native +\parbox{1em}{#1} +^D +[Para [Str "\\parbox{1em}{#1}"]] +``` + +``` +% pandoc -t native +\newcommand{\highlight}[1]{\colorbox{yellow}{\parbox{\dimexpr\linewidth-2\fboxsep}{#1}} + +Hello World +^D +[Para [Str "\\newcommand{",RawInline (Format "tex") "\\highlight",Str "}[1]{\\colorbox{yellow}{\\parbox{",RawInline (Format "tex") "\\dimexpr",RawInline (Format "tex") "\\linewidth-2",RawInline (Format "tex") "\\fboxsep",Str "}{#1}}"] +,Para [Str "Hello",Space,Str "World"]] +```