From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3CD071F81A; Sun, 16 Aug 2015 20:52:09 +0000 (UTC) Date: Sun, 16 Aug 2015 20:52:09 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] view: kill leading empty lines correctly Message-ID: <20150816205209.GA20173@dcvr.yhbt.net> References: <1439716783-29015-1-git-send-email-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1439716783-29015-1-git-send-email-e@80x24.org> List-Id: Was too sleepy to be coding last night :x --- lib/PublicInbox/View.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index e1632b5..6e4d178 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) { -- EW