[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 17/23: [grog]: Don't strip \# comments if -C given.
From: |
G. Branden Robinson |
Subject: |
[groff] 17/23: [grog]: Don't strip \# comments if -C given. |
Date: |
Thu, 23 Sep 2021 08:12:36 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit c2faf899f6cad93dda90427a47c2d6b2040612c4
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
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 <g.branden.robinson@gmail.com>
+ * 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 <g.branden.robinson@gmail.com>
+
[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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 17/23: [grog]: Don't strip \# comments if -C given.,
G. Branden Robinson <=