2011/11/15 Arno Trautmann <[email protected]>:
>> The code isn't supposed to do anything meaningful except show a bug.
>> I've tried (not much) to tinker with formats, removing this from
>> LuaLaTeX and adding that to plain TeX to try to spot what made the
>> difference, but I had no success.
>
> Same here. Seems to be a mystery … maybe some special code Tako built in to
> manipulate LaTeX?
This is caused by the differences in \endlinechar between Plain and
LaTeX. You can trigger the issue using the \endlinechar in math mode.
The following document breaks only with LuaTeX:
\newlinechar=`q
\scantokens{$q$}
\bye