From 994250c358ec523fd4e1e74c32a310fad6a025d3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Apr 2014 06:59:43 +0000 Subject: view: minor cleanups Avoid adding extraneous whitespace in HTML content, as it increases bandwidth usage of network, disk and memory. --- lib/PublicInbox/View.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/PublicInbox/View.pm') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 4ac28346..18ba36a8 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -8,13 +8,13 @@ use CGI qw/escapeHTML/; use Encode qw/decode encode/; use Encode::MIME::Header; -# only one public function: +# public functions: sub as_html { my ($class, $mime, $full_pfx) = @_; headers_to_html_header($mime) . multipart_text_as_html($mime, $full_pfx) . - "\n"; + ''; } sub as_feed_entry { @@ -150,10 +150,8 @@ sub headers_to_html_header { } $rv .= "\n"; - return ("". - join(' - ', @title) . - '
' .
-		$rv);
+	("".  join(' - ', @title) .
+	 '
' .  $rv);
 }
 
 1;
-- 
cgit v1.2.3-24-ge0c7