Follow-up Comment #5, bug #64360 (project groff):
[comment #3 comment #3:] > Just move this line:- > > $lin=~s/^\s+//; > > to before the while loop. Oh. This is what I came up with. Is it wrong? diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl index 074a725c5..200221ce4 100644 --- a/src/devices/gropdf/gropdf.pl +++ b/src/devices/gropdf/gropdf.pl @@ -370,14 +370,14 @@ while (<>) next if $cmd eq '#'; # just a comment my $lin=substr($_,1); - while ($cmd eq 'w') + # 'w' is the only zero-argument command. + if ($cmd eq 'w') { + $w_flg=1 if $t_flg; + $lin=~s/^\s*//; $cmd=substr($lin,0,1); $lin=substr($lin,1); - $w_flg=1 if $t_flg; } - - $lin=~s/^\s+//; # $lin=~s/\s#.*?$//; # remove comment $stream.="\% $_\n" if $debug; > How did you get groff to plant the space? diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp index 152dfda1b..341edce1f 100644 --- a/src/roff/troff/node.cpp +++ b/src/roff/troff/node.cpp @@ -5828,6 +5828,7 @@ int word_space_node::is_tag() void unbreakable_space_node::tprint(troff_output_file *out) { out->fill_color(col); + out->word_marker(); if (is_html) { // we emit the space width as a negative glyph index out->flush_tbuf(); _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64360> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/