]> Sergey Matveev's repositories - public-inbox.git/blobdiff - Documentation/txt2pre
update copyrights for 2018
[public-inbox.git] / Documentation / txt2pre
index 72de0b795567343bde80febc9e5bc90911ef61b9..4c4b2ca2f77b6189b6a72f5f27623a89d5558ef4 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
-# Copyright (C) 2014-2016 all contributors <meta@public-inbox.org>
+# Copyright (C) 2014-2018 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
 # Stupid script to make HTML from preformatted, utf-8 text versions,
@@ -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);