]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: actually omit subject text when dumping topics
authorKyle Meyer <kyle@kyleam.com>
Wed, 22 Apr 2020 01:33:59 +0000 (21:33 -0400)
committerEric Wong <e@yhbt.net>
Wed, 22 Apr 2020 07:02:27 +0000 (07:02 +0000)
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().

lib/PublicInbox/View.pm

index 280d0ea5557024a790012d2bf0ab1e2d950f014b..5144a13046081eaefe53a39686341427a38faeb4 100644 (file)
@@ -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);