On Fri, 5 Dec 2025 at 17:10, Udi Fogiel <[email protected]> wrote:

> Consider the following:
>
> \catcode`\{=1\catcode`\}=2
> \directlua{token.set_macro("foo", [[foo\ foo]])}
> \show\foo
> \toks0\expandafter{\foo}
> \end
>
> > \foo=macro:
> ->fooBAD foo.
> l.5 \show\foo
>
> ?
> )
> Runaway text?
> fooBAD foo} \par \end
> ! File ended while scanning text of \toks.
> <inserted text>
>                 }
>
> set_macro needs to check if the space is the only character
> after a backslash before removing a "trailing" space. I attached a patch.
>
> Thanks,
> Udi
>

Done .

Author: Luigi Scarso <[email protected]>
Date:   Sat Dec 6 19:15:52 2025 +0100

    set_macro needs to check if the space is the only character after a
backslash before removing a "trailing" space (thanks to Udi Fogiel and
H.Hagen)

--
luigi
_______________________________________________
dev-luatex mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to