Files
John MacFarlane 74f583847f 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.
2025-11-03 23:16:48 +01:00

555 B

% 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}"
    ]
]