]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: fix regression in standalone /^>$/ lines
authorEric Wong <e@80x24.org>
Fri, 18 Apr 2014 22:43:59 +0000 (22:43 +0000)
committerEric Wong <e@80x24.org>
Fri, 18 Apr 2014 22:46:32 +0000 (22:46 +0000)
The lack of trailing whitespace in quote prefixes threw us
off and cause t/view to fail.

This failure was caused by
commit fefea3d7d2484ffbf433aec0dd80026aa7120e07
("ensure per-message short quotes do not get too long")
and not caught before pushing because I failed to run
"make", only "prove" (and not even "prove -l" :x).

lib/PublicInbox/View.pm

index ed7d0b664a8dbf1967569ff92bbbea3d618cf022..946ea2e5873a0c7051c3e836eeea4d7d82a5aa05 100644 (file)
@@ -92,7 +92,7 @@ sub add_text_body_short {
        my $s = ascii_html($enc->decode($part->body));
        $s =~ s!^((?:(?:&gt;[^\n]*)\n)+)!
                my $cur = $1;
-               my @lines = split(/\n(?:&gt;\s*)?/, $cur);
+               my @lines = split(/\n/, $cur);
                if (@lines > MAX_INLINE_QUOTED) {
                        # show a short snippet of quoted text
                        $cur = join(' ', @lines);