aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-11-03 20:51:20 +0100
committerJohn MacFarlane <[email protected]>2025-11-03 23:16:48 +0100
commit74f583847fb108593101a34ed88a13005a2252fb (patch)
tree55ea08f3aa4d3eb5bea50dc8142da9db63124810 /test
parent594f1099561790453f4fb4bd8558621f4eec724b (diff)
LaTeX reader: fix bugs in raw LaTeX parsing.
Fix `rawTeXParser`. Make macro expansion in raw LaTeX depend on the setting of the `latex_macros` extension. Previously macros were always expanded, even in raw TeX in markdown. In addition, there was previously a bug that caused content to be garbled in certain cases. Closes #11253. Handle `ifstrequal` at a lower level, like the other `if` commands. See #11253.
Diffstat (limited to 'test')
-rw-r--r--test/command/11253.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/command/11253.md b/test/command/11253.md
new file mode 100644
index 000000000..cc10d8bc0
--- /dev/null
+++ b/test/command/11253.md
@@ -0,0 +1,27 @@
+```
+% pandoc -f markdown -t native
+\ifstrequal{hello}{hello}{TRUE}{FALSE}
+\ifstrequal{hello}{world}{TRUE}{FALSE}
+^D
+[ Para
+ [ RawInline (Format "tex") "TRUE"
+ , SoftBreak
+ , RawInline (Format "tex") "FALSE"
+ ]
+]
+```
+
+```
+% pandoc -f markdown-latex_macros -t native
+\ifstrequal{hello}{hello}{TRUE}{FALSE}
+\ifstrequal{hello}{world}{TRUE}{FALSE}
+^D
+[ Para
+ [ RawInline
+ (Format "tex") "\\ifstrequal{hello}{hello}{TRUE}{FALSE}"
+ , SoftBreak
+ , RawInline
+ (Format "tex") "\\ifstrequal{hello}{world}{TRUE}{FALSE}"
+ ]
+]
+```