From 633a9ecfecd7a111d6727bd4c44750dbb3c9af23 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 1 Feb 2019 21:17:46 -0800 Subject: LaTeX writer: avoid `{}` after control sequences when escaping. `\ldots{}.` doesn't behave as well as `\ldots.` with the latex ellipsis package. This patch causes pandoc to avoid emitting the `{}` when it is not necessary. Now `\ldots` and other control sequences used in escaping will be followed by either a `{}`, a space, or nothing, depending on context. Thanks to Elliott Slaughter for the suggestion. --- test/command/1126.md | 5 ++--- test/command/ascii.md | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'test/command') diff --git a/test/command/1126.md b/test/command/1126.md index 014a8ae2d..e78646fad 100644 --- a/test/command/1126.md +++ b/test/command/1126.md @@ -5,9 +5,8 @@ A&=&B,\\ C&=&D \end{eqnarray} ^D -\textbackslash{}begin\{eqnarray\} -A\&=\&B,\textbackslash{}\textbackslash{} C\&=\&D -\textbackslash{}end\{eqnarray\} +\textbackslash begin\{eqnarray\} A\&=\&B,\textbackslash\textbackslash{} +C\&=\&D \textbackslash end\{eqnarray\} ``` ``` diff --git a/test/command/ascii.md b/test/command/ascii.md index d01389a60..492bf248f 100644 --- a/test/command/ascii.md +++ b/test/command/ascii.md @@ -9,7 +9,7 @@ pandoc -t html --ascii pandoc -t latex --ascii äéıå ^D -\"{a}\'{e}\i \r{a} +\"{a}\'{e}\i\r{a} ``` ``` -- cgit v1.2.3