projects
/
public-inbox.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6835e9
)
view: kill leading whitespace in index
author
Eric Wong <e@80x24.org>
Sun, 31 Aug 2014 02:58:07 +0000 (
02:58
+0000)
committer
Eric Wong <e@80x24.org>
Sun, 31 Aug 2014 02:58:07 +0000 (
02:58
+0000)
Leading whitespace is pointless, but some folks end up adding
it for some reason.
lib/PublicInbox/View.pm
patch
|
blob
|
history
diff --git
a/lib/PublicInbox/View.pm
b/lib/PublicInbox/View.pm
index c1a5fbb17e0af4a703b89aa3031ad0b85f477135..1fb40068a613119b086a63ebb96ac37371bb50a8 100644
(file)
--- 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: