phfaist / pylatexenc

Simple LaTeX parser providing latex-to-unicode and unicode-to-latex conversion
https://pylatexenc.readthedocs.io
MIT License
283 stars 35 forks source link

Error when command taking argument appears at the end of the input #104

Open user202729 opened 3 months ago

user202729 commented 3 months ago

Even when tolerant_parsing=True is given, the following code still throws an error.

from pylatexenc.latexwalker import LatexWalker, LatexEnvironmentNode

(nodelist, pos, len_)=LatexWalker(r"""
\let\aaa\textbf
""", tolerant_parsing=True).get_latex_nodes(pos=0)