From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS11403 64.147.108.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 77EEE1F5AD for ; Wed, 22 Apr 2020 01:34:20 +0000 (UTC) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 61D9E63E6A; Tue, 21 Apr 2020 21:34:19 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=sasl; bh=+Cp6OxcBcLoU6x3jGVLJv8rZX Wg=; b=eHktuscAJC2ZAIrpnrF6XbXsmFuLXerJw4AUi5haMuIjuE6H4A+r71ORS 6zr/XTBFLIO4UCNE1OFUDQwVAqoBI364dsGUwul0LmcsaFRgNOflWpRE+OmpUui+ YzB7swYLymoSRB46keDj7A5wFNFWURBmFg6K0ZOf6Ksk3cPiGU= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 59ADF63E69; Tue, 21 Apr 2020 21:34:19 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:date:message-id:in-reply-to:references:mime-version:content-transfer-encoding; s=mesmtp; bh=CJwsp0E/CEScYJf+JMlV7877gvHf6XyT+AkmNav7OPo=; b=0PkKoJBJ1F5EUWQnY5M+fzS/kTxiD+7PIh2NBPOdXnaGZGdaR1S7xIBB1c5PUuv9IqGvOg4fatK+Le9HD2V1KaEWLmaYiNBqO5uql164m+GTsCiNxCLHNFWemLbOm5PrfqRrK1UbA2eBptxzGvZKgJSlQLttfB/9Evi5Nds+/3o= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id D4D7E63E66; Tue, 21 Apr 2020 21:34:18 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: meta@public-inbox.org Cc: Kyle Meyer Subject: [PATCH 2/2] view: actually omit subject text when dumping topics Date: Tue, 21 Apr 2020 21:33:59 -0400 Message-Id: <20200422013359.16149-3-kyle@kyleam.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200422013359.16149-1-kyle@kyleam.com> References: <20200422013359.16149-1-kyle@kyleam.com> MIME-Version: 1.0 X-Pobox-Relay-ID: 62818E02-8439-11EA-A288-C28CBED8090B-24757444!pb-smtp1.pobox.com Content-Transfer-Encoding: quoted-printable List-Id: 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index c90eaf6a..30928fdb 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -1096,6 +1096,7 @@ sub dump_topics { my @next_prev =3D @subj; # full copy my $omit =3D dedupe_subject($prev_subj, \@subj, ' "'); $prev_subj =3D \@next_prev; + $subj =3D join(' ', @subj); $subj =3D ascii_html($subj); obfuscate_addrs($obfs_ibx, $subj) if $obfs_ibx; $href =3D mid_href($mid); --=20 2.26.0