about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2020-04-21 21:33:58 -0400
committerEric Wong <e@yhbt.net>2020-04-22 07:02:27 +0000
commite3124855ded54f9d9703bd7b72a584edb4422fbe (patch)
tree1184f84143ea6324506d048186a4b3830513db41
parent4bebfa0c80ad7f4596a7dca98b39121470a42af0 (diff)
downloadpublic-inbox-e3124855ded54f9d9703bd7b72a584edb4422fbe.tar.gz
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]
-rw-r--r--lib/PublicInbox/View.pm2
1 files changed, 1 insertions, 1 deletions
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!</b>\n!s;
-        $attr =~ s!<a\nhref.*</a> !!s; # no point in duplicating subject
+        $attr =~ s!<a\nhref.*</a> (?:&#34; )?!!s; # no point in dup subject
         $attr =~ s!<a\nhref=[^>]+>([^<]+)</a>!$1!s; # no point linking to self
         $rv .= "<b>@ $attr";
         if ($nr_c) {