X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=Documentation%2Ftxt2pre;h=62175f3438bd26f266343b26c6350a90af15fa9e;hb=3164ce21aeb7c6ca10638d1c1d14e6f58d5b9180;hp=c8dbd2ba551ab3130728f8f4e4a876a48bdfea88;hpb=24dffae5ea184be57656f147939b96c9f47c075d;p=public-inbox.git
diff --git a/Documentation/txt2pre b/Documentation/txt2pre
index c8dbd2ba..62175f34 100755
--- a/Documentation/txt2pre
+++ b/Documentation/txt2pre
@@ -1,15 +1,15 @@
-#!/usr/bin/env perl
-# Copyright (C) 2014-2021 all contributors
+#!perl -w
+# n.b. this is invoked via $(PERL) in makefiles
+# Copyright (C) all contributors
# License: AGPL-3.0+
#
# Stupid script to make HTML from preformatted, utf-8 text versions,
# only generating links for http(s). Markdown does too much
# and requires indentation to output preformatted text.
-use strict;
-use warnings;
+use v5.12;
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,8 +77,11 @@ for (qw[lei(1)
my ($n) = (/([\w\-\.]+)/);
$xurls{$_} = "$n.html";
$xurls{$n} = "$n.html";
+ /\Alei-(.+?)\(1\)\z/ and $xurls{"lei $1"} = "$n.html";
}
+$xurls{'lei/store'} = 'lei-store-format.html';
+
for (qw[make(1) flock(2) setrlimit(2) vfork(2) tmpfs(5) inotify(7) unix(7)
syslog(3)]) {
my ($n, $s) = (/([\w\-]+)\((\d)\)/);
@@ -161,6 +164,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;