[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-texinfo] @group => <pre>...</pre>?
From: |
Akim Demaille |
Subject: |
[help-texinfo] @group => <pre>...</pre>? |
Date: |
Sat, 27 Apr 2019 10:12:56 +0200 |
Hi all,
I found nothing in the documentation, and my web searches revealed nothing
either. Sorry if I missed something somewhere...
Bison's documentation uses @group quite liberally to prevent bad page breaks,
for instance:
> @example
> $ @kbd{bison -Wmidrule-value mid.y}
> @group
> mid.y:2.6-13: @warning{warning}: unset value: $$
> 2 | exp: @address@hidden a(); @}} "b" @{ $$ = c(); @} @{ d(); @} "e" @{ f
> = $1; @};
> | @warning{^~~~~~~~}
> @end group
> @group
> mid.y:2.19-31: @warning{warning}: unused value: $3
> 2 | exp: @{ a(); @} "b" @address@hidden $$ = c(); @}} @{ d(); @} "e" @{ f
> = $1; @};
> | @warning{^~~~~~~~~~~~~}
> @end group
> @end example
(with nifty colors now :-).
In HTML, I would have expected @address@hidden group to be ignored, but
actually the result is:
> <div class="example">
> <pre class="example">$ <kbd>bison -Wmidrule-value mid.y</kbd>
> </pre><pre class="example">mid.y:2.6-13: <b style="color:purple">warning</b>:
> unset value: $$
> 2 | exp: <b style="color:purple">{ a(); }</b> "b" { $$ = c(); } { d(); }
> "e" { f = $1; };
> | <b style="color:purple">^~~~~~~~</b>
> </pre><pre class="example">mid.y:2.19-31: <b
> style="color:purple">warning</b>: unused value: $3
> 2 | exp: { a(); } "b" <b style="color:purple">{ $$ = c(); }</b> { d(); }
> "e" { f = $1; };
> | <b style="color:purple">^~~~~~~~~~~~~</b>
> </pre></div>
I don't understand why these <pre> are here. The problem is that, since they
have the same class as the div, they inherit from the margins of the div. So
the output looks like it has additional empty lines:
> $ bison -Wmidrule-value mid.y
>
> mid.y:2.6-13: warning: unset value: $$
> 2 | exp: { a(); } "b" { $$ = c(); } { d(); } "e" { f = $1; };
> | ^~~~~~~~
>
> mid.y:2.19-31: warning: unused value: $3
> 2 | exp: { a(); } "b" { $$ = c(); } { d(); } "e" { f = $1; };
> | ^~~~~~~~~~~~~
instead of
> $ bison -Wmidrule-value mid.y
> mid.y:2.6-13: warning: unset value: $$
> 2 | exp: { a(); } "b" { $$ = c(); } { d(); } "e" { f = $1; };
> | ^~~~~~~~
> mid.y:2.19-31: warning: unused value: $3
> 2 | exp: { a(); } "b" { $$ = c(); } { d(); } "e" { f = $1; };
> | ^~~~~~~~~~~~~
I can certainly play with the CSS selectors to avoid this, but before doing so,
I wanted to make sure that the current output was really meant to be this way.
I saw no information on the page of @group, nor any customization variable that
would turn the HTML into what I would have expected: as a single <pre>:
> <div class="example">
> <pre class="example">$ <kbd>bison -Wmidrule-value mid.y</kbd>
> mid.y:2.6-13: <b style="color:purple">warning</b>: unset value: $$
> 2 | exp: <b style="color:purple">{ a(); }</b> "b" { $$ = c(); }
> { d(); } "e" { f = $1; };
> | <b style="color:purple">^~~~~~~~</b>
> mid.y:2.19-31: <b style="color:purple">warning</b>: unused value: $3
> 2 | exp: { a(); } "b" <b style="color:purple">{ $$ = c(); }</b>
> { d(); } "e" { f = $1; };
> | <b style="color:purple">^~~~~~~~~~~~~</b>
> </pre></div>
FWIW, it is visible, but to a lesser extent, in the rendering used on the FSF's
page (fifth block of code):
https://www.gnu.org/software/bison/manual/html_node/Midrule-Action-Translation.html
Cheers!
- [help-texinfo] @group => <pre>...</pre>?,
Akim Demaille <=