URL:
<https://savannah.gnu.org/bugs/?59622>
Summary: [PATCH] grog/subs.pl: Ignore lines added in front of
".TH" by "pod2man"
Project: GNU troff
Submitted by: bjarniig
Submitted on: Fri 04 Dec 2020 06:33:28 PM UTC
Category: Core
Severity: 3 - Normal
Item Group: Incorrect behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
>From 69de136e8f07ba85d4251f8a171d9c9274d159f3 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <[email protected]>
Date: Fri, 4 Dec 2020 18:19:58 +0000
Subject: [PATCH] grog/subs.pl: Ignore lines added in front of ".TH" by
"pod2man"
groff/src/roff/grog/subs.pl: Ignore lines added in front of ".TH" by
the perl module "Pod::Man" (pod2man)
Fixes wrong results for manuals, that are made with the current
"pod2man" command.
See bug #55302 for the initial report.
Signed-off-by: Bjarni Ingi Gislason <[email protected]>
---
src/roff/grog/subs.pl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 65108e38..65e55e78 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -567,6 +567,11 @@ sub do_line {
return if ( $line =~ /^\.$/ ); # ignore .
return if ( $line =~ /^\.\.$/ ); # ignore ..
+ # Ignore "Standard preamble" from the perl module "Pod::Man" (pod2man)
+ return if ( $line =~ /^\.[[:lower:]]/ );
+ return if ( $line =~ /^\.\s*\\}/ );
+ return if ( $line =~ /^\.IX / );
+
if ( $before_first_command ) { # so far without 1st command
if ( $line =~ /^\.TH/ ) {
# check if .TH is 1st command for man
--
2.29.2
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59622>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/