From: Eric Wong Date: Sat, 12 Sep 2015 01:23:30 +0000 (+0000) Subject: view: more consistent prefix for ghost links X-Git-Tag: v1.0.0~891 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=930f2746d48829af6ca8b14ba96e006204fae4d5;p=public-inbox.git view: more consistent prefix for ghost links This will be reused for search views. --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 9f87546f..7d855550 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);