Files
pandoc/test/command/11088.md
T
John MacFarlaneandClaude Opus 5.5 42626eef1d LaTeX reader: detect macro expansion loops across doMacros calls.
A macro whose expansion contains itself after an unknown command,
e.g. `\def\small{\@setfontsize\small\@ixpt{10}}`, was expanded
again and again at the same position, each time in a fresh call
to doMacros, so the existing depth check never triggered and
pandoc hung.  We now track consecutive expansions of the same
macro at the same position and raise PandocMacroLoop after 1000.

Closes #11088.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:12:31 -07:00

173 B

% pandoc -f latex -t native 2>&1
\makeatletter
\def\small{\@setfontsize\small\@ixpt{10}}
\makeatother
\small test
^D
Loop encountered in expanding macro small
=> 91