]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: fixup ghost message errors from threading tweaks
authorEric Wong <e@80x24.org>
Fri, 25 Dec 2015 10:55:58 +0000 (10:55 +0000)
committerEric Wong <e@80x24.org>
Fri, 25 Dec 2015 10:57:32 +0000 (10:57 +0000)
Ghost message links didn't show up too well after
commit bc067a7562a586bed92401fe1084bbe423b9451a
("view: move thread info near top of single view")

Additionally, attribution lacked a space when subjects changed
mid-thread.

lib/PublicInbox/View.pm

index 98d0219dbc57c353163872c9269e63da16d67641..523d27fe997b09394619b8ae6136a8631625ab96 100644 (file)
@@ -774,7 +774,7 @@ sub _inline_header {
        my $m = PublicInbox::Hval->new_msgid($mid);
        $m = $upfx . '../' . $m->as_href . '/';
        if (defined $s) {
-               $$dst .= "$pfx$dot<a\nhref=\"$m\">$s</a>$attr\n";
+               $$dst .= "$pfx$dot<a\nhref=\"$m\">$s</a> $attr\n";
        } else {
                $$dst .= "$pfx$dot<a\nhref=\"$m\">$f</a>\n";
        }
@@ -791,7 +791,7 @@ sub inline_dump {
                _inline_header($dst, $state, $upfx, $mime, $level);
        } else {
                my $dot = $level == 0 ? '' : '` ';
-               my $pfx = length(' 1970-01-01 13:37 ') .
+               my $pfx = (' ' x length(' 1970-01-01 13:37 ')).
                        (INDENT x $level) . $dot;
                $$dst .= $pfx;
                $$dst .= ghost_parent("$upfx../", $node->messageid) . "\n";