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 173.228.157.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-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 579631F610 for ; Wed, 22 Apr 2020 01:34:17 +0000 (UTC) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 05084BA5F7; Tue, 21 Apr 2020 21:34:17 -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=xcsLUGiWjU7I32LbXTqF6C7Z5 xc=; b=vqpU6aFFhg3f4iCZELpAJO7YUt7K2smR6pREnoD22O09xoI0flDumtFag ziThblW6iymYyJ+nwgUehg+vzdsdb4vIGMMwUQvXOiN53ADw+5GHK0nsrdZtNS5L L/9n3BCFHzfEB+V7/MJgHEWun+XPIa7+8L/IamOtMm/B0wceok= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id F0E37BA5F6; Tue, 21 Apr 2020 21:34:16 -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=OhB4IzgHoX1Ke1ZzlcgZU7v0J2yv4oBlKHSubQWJmsU=; b=sodQ+vEGsmnB3EBareXu2CzgpsJ7YCw5ekbZn4DUoe4H90nkBruaLSEEYePwXEWbNzbcGLRep08O3G1YizSrgLqv+LD2e2Xw2iO3CkYpT51EgOfU0r5PZhyOkq1Qd8vU4YsHRxh1lkSZaHhfrsmwa2j9+dxpIr+FfYQLdj75Tgs= 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-smtp21.pobox.com (Postfix) with ESMTPSA id 0FB0FBA5F4; Tue, 21 Apr 2020 21:34:13 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: meta@public-inbox.org Cc: Kyle Meyer Subject: [PATCH 1/2] view: strip omission character from current message in thread view Date: Tue, 21 Apr 2020 21:33:58 -0400 Message-Id: <20200422013359.16149-2-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: 5F0B1FE0-8439-11EA-9FBF-8D86F504CC47-24757444!pb-smtp21.pobox.com Content-Transfer-Encoding: quoted-printable List-Id: 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 E= ric 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. --- 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..c90eaf6a 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -322,7 +322,7 @@ sub _th_index_lite { my $s_s =3D nr_to_s($nr_s, 'sibling', 'siblings'); my $s_c =3D nr_to_s($nr_c, 'reply', 'replies'); $attr =3D~ s!\n\z!\n!s; - $attr =3D~ s! !!s; # no point in duplicating subject + $attr =3D~ s! (" )?!!s; # no point in duplicating sub= ject $attr =3D~ s!]+>([^<]+)!$1!s; # no point linking to s= elf $rv .=3D "@ $attr"; if ($nr_c) { --=20 2.26.0