On Mon, Mar 09, 2026 at 07:43:12PM +0100, Patrice Dumas wrote:
> I think that it is be the consequence of two rules in the Texinfo tree:
> * a new line ends a text element
> * there is only one spaces before argument element associated to an
> element (here brace_arg).
Could spaces at the start of a line be placed in their own element?
Input:
aaaaaaaaaa
bbbbbbbbbbb
This parses as:
*paragraph C2
{aaaaaaaaaa\n}
{ bbbbbbbbbbb\n}
The leading spaces are included with the "bbbbbbbbbbb" text.
This makes a difference when the trailing newline is commented out:
aaaaaaaaaa@c
bbbbbbbbbbb
This should be output in Info as "aaaaaaaaaabbbbbbbbbbb" to match the
TeX output, but instead is output as "aaaaaaaaaa bbbbbbbbbbb".
TeX has a general rule of skipping leading whitespace on a line.
I expect that the change would be made in _abort_empty_line in
Texinfo/ParserNonXS.pm.
> There could additionally be a difficulty to detect that the spaces after
> the new line are continuation of spaces before argument, but it is
> probably secondary, as empty line within brace commands are detected.
I propose that spaces after a new line should be marked specially more
generally, not just in a braced command argument.