* [PATCH] view: kill leading whitespace in index
@ 2014-08-31 3:00 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2014-08-31 3:00 UTC (permalink / raw)
To: meta
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(-)
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index c1a5fbb..1fb4006 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:
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-31 3:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-31 3:00 [PATCH] view: kill leading whitespace in index Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).