]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: kill leading empty lines correctly
authorEric Wong <e@80x24.org>
Sun, 16 Aug 2015 20:51:05 +0000 (20:51 +0000)
committerEric Wong <e@80x24.org>
Sun, 16 Aug 2015 20:51:05 +0000 (20:51 +0000)
Was too sleepy to be coding last night :x

lib/PublicInbox/View.pm

index e1632b5bec319fa6667925e79f9d31d50d30df0e..6e4d17894ca3534f66ca0ac28a5ce803ab671eba 100644 (file)
@@ -143,7 +143,7 @@ sub index_walk {
        $s =~ s/^-- \n.*\z//ms and $$more = 'more...';
 
        # kill any leading or trailing whitespace lines
-       $s =~ s/^[ \t]$//sgm;
+       $s =~ s/^\s*$//sgm;
        $s =~ s/\s+\z//s;
 
        if (length $s) {