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: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id CACA31F9E0; Wed, 22 Apr 2020 07:01:12 +0000 (UTC) Date: Wed, 22 Apr 2020 07:01:12 +0000 From: Eric Wong To: Kyle Meyer Cc: meta@public-inbox.org Subject: Re: [PATCH 1/2] view: strip omission character from current message in thread view Message-ID: <20200422070112.GA3882@dcvr> References: <20200422013359.16149-1-kyle@kyleam.com> <20200422013359.16149-2-kyle@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200422013359.16149-2-kyle@kyleam.com> List-Id: Kyle Meyer wrote: Thanks for this series (and for figuring out how some of this code works :) > +++ 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!\n!s; > - $attr =~ s! !!s; # no point in duplicating subject > + $attr =~ s! (" )?!!s; # no point in duplicating subject PATCH 2/2 looked fine, some minor nits on this one: 1) use `?:' when you don't intend to use $1 before the next RE match. `?:' avoids a small amount of overhead for saving $1. 2) line exceeds 80 columns, I just shortened "duplicating" to "dup" (I like really big fonts) Will squash this in before pushing: diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 30928fdb..5144a130 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!\n!s; - $attr =~ s! (" )?!!s; # no point in duplicating subject + $attr =~ s! (?:" )?!!s; # no point in dup subject $attr =~ s!]+>([^<]+)!$1!s; # no point linking to self $rv .= "@ $attr"; if ($nr_c) { Thanks again.