deri pushed a commit to branch master
in repository groff.
commit 99cac61462721c574b7af654604de2556660aada
Author: Deri James <[email protected]>
AuthorDate: Mon Feb 9 19:09:27 2026 +0000
Allow whitespace.
* src/devices/gropdf/gropdf.pl: Allow whitespace after grout
'w' command.
Fixes <https://savannah.gnu.org/bugs/?64360>.
Thanks to G. Branden Robinson for report and patch and Dave
(for guidance).
---
ChangeLog | 10 ++++++++++
src/devices/gropdf/gropdf.pl | 7 ++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a63771063..879861db8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2026-01-20 Deri James <[email protected]>
+
+ * src/devices/gropdf/gropdf.pl: Allow whitespace after grout
+ 'w' command.
+
+ Fixes <https://savannah.gnu.org/bugs/?64360>.
+
+ Thanks to G. Branden Robinson for report and patch and Dave
+ (for guidance).
+
2026-02-08 G. Branden Robinson <[email protected]>
* src/devices/gropdf/gropdf.pl: Rename new `--opt` command-line
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index f4768d5d3..c4e9d6755 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -640,19 +640,20 @@ while (<>)
$_=shift(@ahead);
}
-
+ s/^w+\s*/w/;
my $cmd=substr($_,0,1);
next if $cmd eq '#'; # just a comment
my $lin=substr($_,1);
- while ($cmd eq 'w')
+ if ($cmd eq 'w')
{
$cmd=substr($lin,0,1);
- $lin=substr($lin,1);
+ $lin=substr($lin,1) if $lin;
$w_flg=1 if $gotT;
}
$lin=~s/^\s+//;
+ next if !$lin;
# $lin=~s/\s#.*?$//; # remove comment
$stream.="\% $_\n" if $debug;
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit