[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 23/23: [grog]: Slightly refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 23/23: [grog]: Slightly refactor. |
Date: |
Thu, 23 Sep 2021 08:12:38 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit a05d5fc4a7e8bd1a2351071df0a994330201153a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Sep 23 21:24:49 2021 +1000
[grog]: Slightly refactor.
* src/utils/grog/grog.pl (do_line): Move first-macro-call test for `TH`
to a more appropriate location.
---
ChangeLog | 5 +++++
src/utils/grog/grog.pl | 11 ++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bd3d5a1..b5e657f 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): Move first-macro-call test
+ for `TH` to a more appropriate location.
+
+2021-09-23 G. Branden Robinson <g.branden.robinson@gmail.com>
+
[grog]: Refactor to make it easier to generalize a per-package
scoring mechanism.
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index 60f1853..b1da77f 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -296,11 +296,6 @@ sub do_line {
$command = '' unless ($command);
$args = '' unless ($args);
- if ((!$have_seen_first_macro_call) && ($command eq 'TH')) {
- # .TH as the first macro call in a document screams man(7).
- $man_score += 100;
- }
-
######################################################################
# user-defined macros
@@ -372,6 +367,12 @@ sub do_line {
# man and ms share too many macro names for the following approch to
# be fruitful for many documents; see &infer_man_or_ms_package.
+ #
+ # We can put one thumb on the scale, however.
+ if ((!$have_seen_first_macro_call) && ($macro eq 'TH')) {
+ # TH as the first call in a document screams man(7).
+ $man_score += 100;
+ }
##########
# mdoc
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 23/23: [grog]: Slightly refactor.,
G. Branden Robinson <=