From 09b1fc82d53228212805b7e26aa1d4bf381cecd6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 20 Aug 2015 02:30:27 +0000 Subject: use tables for rendering comment nesting This is more space efficient since we don't need to place padding bytes in front of every line. While this unfortunately does not render well on lynx; w3m, links, elinks can all render tables sanely. Tables are also superior for long lines which require wrapping inside
 containers.
---
 lib/PublicInbox/Feed.pm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'lib/PublicInbox/Feed.pm')

diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 0b7ef7f8..8bfd19e7 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -12,7 +12,6 @@ use PublicInbox::View;
 use constant {
 	DATEFMT => '%Y-%m-%dT%H:%M:%SZ', # atom standard
 	MAX_PER_PAGE => 25, # this needs to be tunable
-	PRE_WRAP => "",
 };
 
 # main function
@@ -60,7 +59,7 @@ sub generate_html_index {
 	my $html = "$title" .
 		'{atomurl} . "\"\ntype=\"application/atom+xml\"/>" .
-		'' . PRE_WRAP;
+		'';
 
 	my $state;
 	my $git = PublicInbox::GitCatFile->new($ctx->{git_dir});
@@ -80,9 +79,9 @@ sub generate_html_index {
 	if ($footer) {
 		my $list_footer = $ctx->{footer};
 		$footer .= "\n" . $list_footer if $list_footer;
-		$footer = "
" . PRE_WRAP . "$footer
"; + $footer = "
$footer
"; } - $html . "$footer"; + $html .= "$footer"; } # private subs -- cgit v1.2.3-24-ge0c7