From: Eric Wong <e@80x24.org>
Date: Sun, 3 Jul 2016 00:59:07 +0000 (+0000)
Subject: view: remove self-linkification in thread views
X-Git-Tag: v1.0.0~314
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6ef495caacffe26bfc131fa1995373c42316def0;p=public-inbox.git

view: remove self-linkification in thread views

There is no point for diverting readers' attention with
an unnecessary link, here.
---

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 1527959d..e8395ae9 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -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) {