diff options
author | Eric Wong <e@80x24.org> | 2016-08-31 19:32:12 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-08-31 19:32:12 +0000 |
commit | 50f05cb638a643c70d5a78eb9cc40bdcc890ce87 (patch) | |
tree | d16c75d67d83746560219dd7b0d81d1e0c82416a /Documentation/txt2pre | |
parent | dfb1ed795ba2890b710b3faee82db9ccdf888e17 (diff) | |
download | public-inbox-50f05cb638a643c70d5a78eb9cc40bdcc890ce87.tar.gz |
This will allow reasonable titles to be generated for manpages.
Diffstat (limited to 'Documentation/txt2pre')
-rwxr-xr-x | Documentation/txt2pre | 3 |
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); |