]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: remove self-linkification in thread views
authorEric Wong <e@80x24.org>
Sun, 3 Jul 2016 00:59:07 +0000 (00:59 +0000)
committerEric Wong <e@80x24.org>
Sun, 3 Jul 2016 00:59:28 +0000 (00:59 +0000)
There is no point for diverting readers' attention with
an unnecessary link, here.

lib/PublicInbox/View.pm

index 1527959d52fe05fe1721b511263d1c08e8751d4b..e8395ae91fb1c9558cccefa8abda7cefd3f13bba 100644 (file)
@@ -219,6 +219,7 @@ sub _th_index_lite {
        my $this = $map->[1];
        $this =~ s!\n\z!</b>\n!s;
        $this =~ s!<a\nhref.*</a> !!s; # no point in duplicating subject
+       $this =~ s!<a\nhref=[^>]+>([^<]+)</a>!$1!s; # no point linking to self
        $rv .= "<b>@ $this";
        my $node = $map->[2];
        if (my $child = $node->child) {