From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id A000C633835 for ; Sat, 12 Sep 2015 01:23:41 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/3] view: more consistent prefix for ghost links Date: Sat, 12 Sep 2015 01:23:30 +0000 Message-Id: <20150912012332.1542-2-e@80x24.org> In-Reply-To: <20150912012332.1542-1-e@80x24.org> References: <20150912012332.1542-1-e@80x24.org> List-Id: This will be reused for search views. --- lib/PublicInbox/View.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 9f87546..7d85555 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -598,7 +598,7 @@ sub ghost_parent { $mid = PublicInbox::Hval->new_msgid($mid); my $href = $mid->as_href; my $html = $mid->as_html; - qq{[parent not found: <$html>]}; + qq{[parent not found: <$html>]}; } sub __thread_entry { @@ -619,7 +619,7 @@ sub __thread_entry { foreach my $g (@$ghost) { $$cb->write("" . (INDENT x $g->[1]) . "" . - PRE_WRAP . ghost_parent('../', $g->[0]) . + PRE_WRAP . ghost_parent('../../', $g->[0]) . ''); } } @@ -751,7 +751,8 @@ sub inline_dump { } else { my $dot = $level == 0 ? '' : '` '; my $pfx = (INDENT x $level) . $dot; - $$dst .= $pfx . ghost_parent($upfx, $node->messageid) . "\n"; + $$dst .= $pfx; + $$dst .= ghost_parent("$upfx../", $node->messageid) . "\n"; } inline_dump($dst, $state, $upfx, $node->child, $level+1); inline_dump($dst, $state, $upfx, $node->next, $level); -- EW