siefkenj / unified-latex

Utilities for parsing and manipulating LaTeX ASTs with the Unified.js framework
MIT License
85 stars 20 forks source link

A bug of attachMacroArgsInArray #71

Open theseanl opened 6 months ago

theseanl commented 6 months ago
\NewDocumentCommand{\xxx}{ e{_} }{#1}

$\xxx_1$

Here _ shouldn't be parsed as a macro, but rather as a part of an argument of \xxx, but currently _1 is first gobbled as a macro and \xxx cannot find an argument.

Logic in attach-arguments.ts need to be changed.