From ee8ef957fe606280baaa03700779b43e5408a8fa Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 31 Aug 2014 02:58:07 +0000 Subject: view: kill leading whitespace in index Leading whitespace is pointless, but some folks end up adding it for some reason. --- lib/PublicInbox/View.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index c1a5fbb1..1fb40068 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -113,7 +113,8 @@ sub index_entry { $more = "$pfx...\n"; } - # kill any trailing whitespace + # kill any leading or trailing whitespace + $s =~ s/\A\s+//s; $s =~ s/\s+\z//s; # add prefix: -- cgit v1.2.3-24-ge0c7