gbranden pushed a commit to branch master
in repository groff.

commit c2faf899f6cad93dda90427a47c2d6b2040612c4
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Sep 23 16:25:00 2021 +1000

    [grog]: Don't strip \# comments if -C given.
    
    * src/utils/grog/grog.pl (do_line): Don't strip groff-style comments \#
      if AT&T compatibility mode is enabled.
---
 ChangeLog              | 5 +++++
 src/utils/grog/grog.pl | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 935b369..a301c63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2021-09-23  G. Branden Robinson <[email protected]>
 
+       * src/utils/grog/grog.pl (do_line): Don't strip groff-style
+       comments \# if AT&T compatibility mode is enabled.
+
+2021-09-23  G. Branden Robinson <[email protected]>
+
        [libgroff]: Perform more font description file validation.  Our
        documentation said that the `name` directive was mandatory but
        we didn't actually enforce this.  Also be more specific in our
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index 20cdc2f..cd1a62e 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -218,7 +218,7 @@ sub do_line {
 
   # Strip comments.
   $line =~ s/\\".*//;
-  $line =~ s/\\#.*//;
+  $line =~ s/\\#.*// unless $use_compatibility_mode;
 
   return unless ($line =~ /^[.']/);    # Ignore text lines.
 

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to