From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) 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.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D6F3C20193; Sat, 6 Aug 2016 00:30:41 +0000 (UTC) Date: Sat, 6 Aug 2016 00:30:41 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/1] view: do not introduce excessive in $MID/t/ view Message-ID: <20160806003041.GA6028@dcvr> References: <20160805181459.24420-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160805181459.24420-1-e@80x24.org> List-Id: When using
  • ..., we already setup
     tags
    in thread_index_entry, so having an extra 
    tag causes validation errors. Fixes: 6ef9b216156c ("view: use
    to delineate in /$MID/T/ view") --- lib/PublicInbox/View.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index e150a01..d6711d5 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -164,13 +164,17 @@ sub index_entry { "permalink" . " raw" . " reply"; + + my $hr; if (my $pct = $ctx->{pct}) { # used by SearchView.pm $rv .= "\t[relevance $pct->{$mid_raw}%]"; + $hr = 1; } elsif ($mapping) { my $threaded = 'threaded'; my $flat = 'flat'; my $end = ''; if ($ctx->{flat}) { + $hr = 1; $flat = "$flat"; } else { $threaded = "$threaded"; @@ -180,7 +184,8 @@ sub index_entry { $rv .= " $ctx->{s_nr}"; } - $rv .= $more ? '
    ' : '
    '; + $rv .= $more ? '
    ' : '
    ' if $hr; + $rv; } sub pad_link ($$;$) { -- EW