URL: <https://savannah.gnu.org/bugs/?65227>
Summary: [grog] mishandles options containing 'C' Group: GNU roff Submitter: gbranden Submitted: Tue 30 Jan 2024 03:05:02 AM UTC Category: Utilities Severity: 3 - Normal Item Group: Incorrect behaviour Status: In Progress Privacy: Public Assigned to: gbranden Open/Closed: Open Discussion Lock: Any Planned Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Tue 30 Jan 2024 03:05:02 AM UTC By: G. Branden Robinson <gbranden> Using _grog_ to view the _groff_mom_(7) page on my system produced a nasty surprise of an ill-formatted documented. Investigation revealed that that _grog_ inferred use of the _me_(7) macro package for this _man_(7) document. Further investigation revealed that my passage of the `-rCHECKSTYLE=4` argument was causing the problem. _grog_ thought it was supposed to be interpreting the document in compatibility mode, which was incorrect. The problem is a too-loose regex. # Our do_line() needs to know if it should do compatibility parsing. $use_compatibility_mode = 1 if ($arg =~ /C/); This of course matches a "C" anywhere in $arg; Perl doesn't know that it's looking at an option cluster. I'm not marking this as a regression from 1.22.4 because that version's _grog_ didn't perform well with my (script-constructed) command line either. $ /usr/bin/grog -Tutf8 -b -ww -P-i -rU1 -rCHECKSTYLE=4 -rPO=19n -rLL=80n /home/branden/groff-HEAD/share/man/man7/groff_mom.7 groff -b -w -w -r -U1 -T utf8 -man /home/branden/groff-HEAD/share/man/man7/groff_mom.7 Turning on unsafe mode isn't actually a brilliant move there. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?65227> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/