"G. Branden Robinson" <g.branden.robin...@gmail.com> writes:

> I found one.  I won't claim it's a high-impact case because the syntax
> of the programming language being illustrated doesn't attach
> significance to the difference, but a rendering change _does_ result.

> $ zgrep -C1 'no id' $(man -w MIME::Field::ParamVal)
> \&    # Get an attribute, or undefined if not present:
> \&    print "no id!"  if defined($field\->param(\*(Aqid\*(Aq));
> \&
> \&    # Same, but use empty string for missing values:
> \&    print "no id!"  if ($field\->paramstr(\*(Aqid\*(Aq) eq \*(Aq\*(Aq);
> \&
> $ zcat $(man -w MIME::Field::ParamVal) | nroff -Wreg -Wfont -man \
>   | grep -C1 'no id'
>          # Get an attribute, or undefined if not present:
>          print "no id!"  if defined($field->param('id'));

>          # Same, but use empty string for missing values:
>          print "no id!"  if ($field->paramstr('id') eq '');
> $ zcat $(man -w MIME::Field::ParamVal) | nroff -Wreg -Wfont -man -mfr \
>   | grep -C1 'no id'
>          # Get an attribute, or undefined if not present:
>          print "no id!" if defined($field->param('id'));

>          # Same, but use empty string for missing values:
>          print "no id!" if ($field->paramstr('id') eq '');

> Notice how two spaces shrink to one after the rendered `no id!`.

Sorry, I need a bit more context here for why the *roff input needs to
change. That section of output is inside a ".nf" block. Why is groff
messing with the spacing of output inside .nf? I would have naively
assumed that it would be a bug in the *roff processor to make changes to
whitespace inside ".nf".

-- 
Russ Allbery (ea...@eyrie.org)             <https://www.eyrie.org/~eagle/>

Reply via email to