about summary refs log tree commit homepage
path: root/Documentation/txt2pre
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-08-31 19:32:12 +0000
committerEric Wong <e@80x24.org>2016-08-31 19:32:12 +0000
commit50f05cb638a643c70d5a78eb9cc40bdcc890ce87 (patch)
treed16c75d67d83746560219dd7b0d81d1e0c82416a /Documentation/txt2pre
parentdfb1ed795ba2890b710b3faee82db9ccdf888e17 (diff)
downloadpublic-inbox-50f05cb638a643c70d5a78eb9cc40bdcc890ce87.tar.gz
This will allow reasonable titles to be generated for
manpages.
Diffstat (limited to 'Documentation/txt2pre')
-rwxr-xr-xDocumentation/txt2pre3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/txt2pre b/Documentation/txt2pre
index 72de0b79..2f1799fc 100755
--- a/Documentation/txt2pre
+++ b/Documentation/txt2pre
@@ -11,7 +11,8 @@ use PublicInbox::Linkify;
 use PublicInbox::Hval qw(ascii_html);
 
 my $str = eval { local $/; <> };
-my ($title) = ($str =~ /\A([^\n]+)/);
+my $title = $ENV{TITLE};
+($title) = ($str =~ /\A([^\n]+)/) unless $title;
 $title = ascii_html($title);
 my $l = PublicInbox::Linkify->new;
 $str = $l->linkify_1($str);