X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FView.pm;h=b90cb08baadc04783c54a43853a39f5545dd983d;hb=23af251dd607c4e75ab1e68063f2c885c48cc035;hp=116aa6418c4404475913b740f8ad373924077b8c;hpb=2eac33fffcf1757675a959e69eb34f04e446bd25;p=public-inbox.git diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 116aa641..b90cb08b 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -260,7 +260,6 @@ sub eml_entry { } elsif ($mapping) { my $nested = 'nested'; my $flat = 'flat'; - my $end = ''; if ($ctx->{flat}) { $hr = 1; $flat = "$flat"; @@ -586,7 +585,7 @@ sub add_text_body { # callback for each_part # makes no difference to browsers, and don't screw up filename # link generation in diffs with the extra '%0D' - $s =~ s/\r\n/\n/sg; + $s =~ s/\r+\n/\n/sg; # will be escaped to `•' in HTML obfuscate_addrs($ibx, $s, "\x{2022}") if $ibx->{obfuscate}; @@ -1073,10 +1072,10 @@ sub _skel_ghost { } sub sort_ds { - [ sort { + @{$_[0]} = sort { (eval { $a->topmost->{ds} } || 0) <=> (eval { $b->topmost->{ds} } || 0) - } @{$_[0]} ]; + } @{$_[0]}; } # accumulate recent topics if search is supported