diff options
author | Eric Wong <e@80x24.org> | 2022-11-03 00:48:35 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-11-03 18:42:14 +0000 |
commit | 58a67d73088ab37e6a86347d8fe9043a005494df (patch) | |
tree | 8011942627b253ec48689ef982f569394056c72d /Documentation/txt2pre | |
parent | 7559defa226c950fd9ace161294b3fbcf0200e75 (diff) | |
download | public-inbox-58a67d73088ab37e6a86347d8fe9043a005494df.tar.gz |
While manpages are named `L<lei-COMMAND(1)>', `lei COMMAND' can be worth linkifying for ease-of-navigation, too.
Diffstat (limited to 'Documentation/txt2pre')
-rwxr-xr-x | Documentation/txt2pre | 6 |
1 files changed, 5 insertions, 1 deletions
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; |