blefloch / latex-unravel

Watching TeX digest tokens
24 stars 1 forks source link

u<text> at the macro prompt can affect another \unravel call #52

Closed Skillmon closed 2 years ago

Skillmon commented 2 years ago

When using u<text> to step until the input starts with <text> this might affect the behaviour of a later call to \unravel if <text> is never found. I'd expect the first \unravel to finish and the second call to not be affected by this.

MWE:

\RequirePackage{unravel}

\def\one{\two}
\def\two{\three}
\def\three{}

\unravel{\one}
\unravel{\one}
\stop

Console output:

======== Welcome to the unravel package ========
    "<|" denotes the output to TeX's stomach.
    "||" denotes tokens waiting to be used.
    "|>" denotes tokens that we will act on.
    Press <enter> to continue; 'h' <enter> for help.

||
|> \one
u.
[===== Step 1 =====] \one = macro:->\two
[===== Step 2 =====] \two = macro:->\three
[===== Step 3 =====] \three = macro:->

======== Welcome to the unravel package ========
    "<|" denotes the output to TeX's stomach.
    "||" denotes tokens waiting to be used.
    "|>" denotes tokens that we will act on.
    Press <enter> to continue; 'h' <enter> for help.

||
|> \one
[===== Step 1 =====] \one = macro:->\two
||
|> \two
[===== Step 2 =====] \two = macro:->\three
||
|> \three
[===== Step 3 =====] \three = macro:->
||
|>
[===== End =====]