about summary refs log tree commit homepage
path: root/lib
diff options
authorEric Wong <e@80x24.org>2019-04-24 19:52:14 +0000
committerEric Wong <e@80x24.org>2019-04-24 19:53:20 +0000
commit39005a442b1fa72a3c4008d414823a9073e354bb (patch)
tree4795727e5c0a8249184e126777721228864887a6 /lib
parent99eb80852894a4f226fbbd7e4adc8c94541fe527 (diff)
Otherwise, there's no reason to use this API over highlight(1).
Maybe this can be an option in the future; but I'm struggling to
find a reason to not do it by default.
Diffstat (limited to 'lib')
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/PublicInbox/WwwHighlight.pm b/lib/PublicInbox/WwwHighlight.pm
index 01916401..d8101b75 100644
--- a/lib/PublicInbox/WwwHighlight.pm
+++ b/lib/PublicInbox/WwwHighlight.pm
@@ -24,6 +24,7 @@ use warnings;
 use bytes (); # only for bytes::length
 use HTTP::Status qw(status_message);
 use parent qw(PublicInbox::HlMod);
+use PublicInbox::Linkify qw();
 # TODO: support highlight(1) for distros which don't package the
 # SWIG extension.  Also, there may be admins who don't want to
@@ -64,7 +65,10 @@ sub call {
         return r(405) if $req_method ne 'PUT';
         my $bref = read_in_full($env) or return r(500);
+        my $l = PublicInbox::Linkify->new;
+        $l->linkify_1($$bref);
         $bref = $self->do_hl($bref, $env->{PATH_INFO});
+        $l->linkify_2($$bref);
         my $h = [ 'Content-Type', 'text/html; charset=UTF-8' ];
         push @$h, 'Content-Length', bytes::length($$bref);