about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2020-04-21 21:33:59 -0400
committerEric Wong <e@yhbt.net>2020-04-22 07:02:27 +0000
commita45aef4d6415553dd1f6744770b00ea9033f58d7 (patch)
tree80c14b442e654ec7436812db55df50ed461e4275
parente3124855ded54f9d9703bd7b72a584edb4422fbe (diff)
downloadpublic-inbox-a45aef4d6415553dd1f6744770b00ea9033f58d7.tar.gz
Despite dump_topics() calling dedupe_subject() on the subject, the
index shows partly duplicated subjects, for example

  ` [PATCH 2/2] t/www_listing: avoid 'once' warnings
    ` [PATCH v2] t/www_listing: avoid 'once' warnings "

In the second line, the omission character " is appended, but the
entire subject is shown.  To display the subject with duplicated parts
omitted, regenerate it from the array that is modified by
dedupe_subject().
-rw-r--r--lib/PublicInbox/View.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 280d0ea5..5144a130 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -1096,6 +1096,7 @@ sub dump_topics {
                         my @next_prev = @subj; # full copy
                         my $omit = dedupe_subject($prev_subj, \@subj, ' &#34;');
                         $prev_subj = \@next_prev;
+                        $subj = join(' ', @subj);
                         $subj = ascii_html($subj);
                         obfuscate_addrs($obfs_ibx, $subj) if $obfs_ibx;
                         $href = mid_href($mid);