gbranden pushed a commit to branch master
in repository groff.

commit b95e82a80c02ca30c36c25f4915aef257bf81260
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Mon Jan 29 21:07:55 2024 -0600

    [grog]: Fix Savannah #65227.
    
    * src/utils/grog/grog.pl (process_arguments): Match a 'C' only in a
      groff option cluster when deciding to enable compatibility mode, not
      any 'C' anywhere in any option.
    
    Fixes <https://savannah.gnu.org/bugs/?65227>.
---
 ChangeLog              | 10 ++++++++++
 src/utils/grog/grog.pl |  3 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c21eee5a9..bd728cef7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,16 @@
 
        * src/devices/gropdf/gropdf.pl: minor fixes
 
+2024-01-29  G. Branden Robinson <g.branden.robin...@gmail.com>
+
+       [grog]: Fix Savannah #65227.
+
+       * src/utils/grog/grog.pl (process_arguments): Match a 'C' only
+       in a groff option cluster when deciding to enable compatibility
+       mode, not any 'C' anywhere in any option.
+
+       Fixes <https://savannah.gnu.org/bugs/?65227>.
+
 2024-01-29  G. Branden Robinson <g.branden.robin...@gmail.com>
 
        [tbl]: Fix Savannah #65225.
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index c70eb16d1..bd01d6856 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -164,9 +164,10 @@ sub process_arguments {
 
     # Treat anything else as (possibly clustered) groff options that
     # take no arguments.
+    my $cluster = '[abcCeEgGijklNpRsStUVXzZ]*';
 
     # Our do_line() needs to know if it should do compatibility parsing.
-    $use_compatibility_mode = 1 if ($arg =~ /C/);
+    $use_compatibility_mode = 1 if ($arg =~ /^-${cluster}C${cluster}/);
 
     push @command, $arg;
   }

_______________________________________________
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to