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.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE 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 6DA2D1F62F for ; Sat, 10 Sep 2022 08:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1662797935; bh=wYfDa8xAeNIE4gpaaAiMsNrs1jYy+H+zyx4wYFnmKCg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cP1HimeUWXVukaWD/3l4bUIkCc2m2DxGHGFN/kACYPbOAiK/rCcQRs0YIt1G/wdWD JtOpt7tHKA65HfGtkHn83GhRfvQaQ/g61+QxL6YY4BwJ1ha/jZS022ZNVBribVrdw7 T9nkhGexmhAlK0NVK4anwn+yJq1Z+TGto++bIlwE= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 21/38] view: html_footer: golf out a few lines Date: Sat, 10 Sep 2022 08:17:12 +0000 Message-Id: <20220910081729.2011934-22-e@80x24.org> In-Reply-To: <20220910081729.2011934-1-e@80x24.org> References: <20220910081729.2011934-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We can build `$u' in one line, and drop an unnecessary empty line to reduce the amount of scrolling required to read this sub. --- lib/PublicInbox/View.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 52d37a9f..b27523b2 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -811,7 +811,6 @@ ${fallback}other threads:[~$t_fmt UTC|newest] EOF - thread_skel(\$skel, $ctx, $hdr); my ($next, $prev); my $parent = ' '; @@ -821,12 +820,8 @@ EOF $n = mid_href($n); $next = "next"; } - my $u; my $par = $ctx->{parent_msg}; - if ($par) { - $u = mid_href($par); - $u = "$upfx$u/"; - } + my $u = $par ? $upfx.mid_href($par).'/' : undef; if (my $p = $ctx->{prev_msg}) { $prev = mid_href($p); if ($p && $par && $p eq $par) {