From e3124855ded54f9d9703bd7b72a584edb4422fbe Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 21 Apr 2020 21:33:58 -0400 Subject: [PATCH] view: strip omission character from current message in thread view In the thread view shown at the top of a message, the subject for the current message is dropped, leaving just the sender's name. However, if skel_dump() omitted part of the subject because it was duplicated, the omission character is still displayed: * [PATCH v2] t/www_listing: avoid 'once' warnings 2020-03-21 1:10 ` [PATCH 2/2] t/www_listing: avoid 'once' warnings Eric Wong @ 2020-03-21 5:24 ` " Eric Wong Note the " on the last line. Adjust the regular expression in _th_index_lite() to account for the omission character. [ew: avoid capturing $1, keep under 80 cols] --- lib/PublicInbox/View.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 9b62ed3c..280d0ea5 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -322,7 +322,7 @@ sub _th_index_lite { my $s_s = nr_to_s($nr_s, 'sibling', 'siblings'); my $s_c = nr_to_s($nr_c, 'reply', 'replies'); $attr =~ s!\n\z!\n!s; - $attr =~ s! !!s; # no point in duplicating subject + $attr =~ s! (?:" )?!!s; # no point in dup subject $attr =~ s!]+>([^<]+)!$1!s; # no point linking to self $rv .= "@ $attr"; if ($nr_c) { -- 2.44.0