diff options
author | Eric Wong <e@80x24.org> | 2015-08-16 09:12:24 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-08-16 09:19:10 +0000 |
commit | 1da08c65082ceb23484f1ac80d1a5062e9cea240 (patch) | |
tree | bba90c605684640411ac73deb6018449fec50529 /lib | |
parent | 6f1535a7af8124d724102a711072ddd94d741a44 (diff) | |
download | public-inbox-1da08c65082ceb23484f1ac80d1a5062e9cea240.tar.gz |
No point in wasting bytes even if gets compressed over the wire, it'll use more memory when rendering on the client.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/View.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 660a112f..e1632b5b 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -142,14 +142,17 @@ sub index_walk { # Drop signatures $s =~ s/^-- \n.*\z//ms and $$more = 'more...'; - # kill any leading or trailing whitespace - $s =~ s/\A\s+//s; + # kill any leading or trailing whitespace lines + $s =~ s/^[ \t]$//sgm; $s =~ s/\s+\z//s; if (length $s) { # add prefix: $s =~ s/^/$pfx/sgm; + # kill per-line trailing whitespace + $s =~ s/[ \t]+$//sgm; + $rv .= $s . "\n"; } $rv; |