From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D9D6F1FB05 for ; Thu, 3 Nov 2022 00:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1667436519; bh=FjPS2TeLImrDY8IqTgUnFqOiJsKDePtFgZhU6Sj2Aa8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VBgV8EtnrbNNf+wN9YNnnKQdoWZuRM9IwexeMMY24qQqxf4LXWL5c1DIm2Mk4lYTR SbL/KnfNCqtHoEm/rCPYMYJOO15LdMSYLeEeiTzKmSnUvQt7DqOrrYlk5+UEBH+AZu 6w+532113UAzX9PR3FXx2LWsWH6so4Ti2wvDq4Us= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/6] doc: txt2pre: linkify "lei COMMAND" form Date: Thu, 3 Nov 2022 00:48:35 +0000 Message-Id: <20221103004838.26331-4-e@80x24.org> In-Reply-To: <20221103004838.26331-1-e@80x24.org> References: <20221103004838.26331-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: While manpages are named `L', `lei COMMAND' can be worth linkifying for ease-of-navigation, too. --- Documentation/txt2pre | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/txt2pre b/Documentation/txt2pre index c8dbd2ba..82573a30 100755 --- a/Documentation/txt2pre +++ b/Documentation/txt2pre @@ -9,7 +9,7 @@ use strict; use warnings; use PublicInbox::Linkify; use PublicInbox::Hval qw(ascii_html); -my %xurls; +my (%xurls, %lei); for (qw[lei(1) lei-add-external(1) lei-add-watch(1) @@ -77,6 +77,7 @@ for (qw[lei(1) my ($n) = (/([\w\-\.]+)/); $xurls{$_} = "$n.html"; $xurls{$n} = "$n.html"; + /\Alei-(.+?)\(1\)\z/ and $xurls{"lei $1"} = "$n.html"; } for (qw[make(1) flock(2) setrlimit(2) vfork(2) tmpfs(5) inotify(7) unix(7) @@ -161,6 +162,9 @@ if ($str =~ /^NAME\n\s+([^\n]+)/sm) { if ($title =~ /([\w\.\-]+)/) { delete $xurls{$1}; } + if ($title =~ /\blei-([\w\-]+)\b/) { + delete $xurls{"lei $1"}; + } } $title = ascii_html($title); my $l = PublicInbox::Linkify->new;