From: Eric Wong Date: Sun, 16 Aug 2015 20:51:05 +0000 (+0000) Subject: view: kill leading empty lines correctly X-Git-Tag: v1.0.0~1067 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=af0c513d49bae691f636b00efd1635b565b40c9d;p=public-inbox.git view: kill leading empty lines correctly Was too sleepy to be coding last night :x --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index e1632b5b..6e4d1789 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -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) {