diff options
author | Eric Wong <e@80x24.org> | 2015-08-20 02:30:27 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-08-20 02:31:33 +0000 |
commit | 09b1fc82d53228212805b7e26aa1d4bf381cecd6 (patch) | |
tree | 5f429ede50ba985561314ae2ef37440dafd79a1d /lib/PublicInbox/Feed.pm | |
parent | 7245596edd0167791e7324c2d34b7fd340a4557c (diff) | |
download | public-inbox-09b1fc82d53228212805b7e26aa1d4bf381cecd6.tar.gz |
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 <pre> containers.
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r-- | lib/PublicInbox/Feed.pm | 7 |
1 files changed, 3 insertions, 4 deletions
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 => "<pre\nstyle=\"white-space:pre-wrap\">", }; # main function @@ -60,7 +59,7 @@ sub generate_html_index { my $html = "<html><head><title>$title</title>" . '<link rel="alternate" title="Atom feed"' . "\nhref=\"" . $feed_opts->{atomurl} . "\"\ntype=\"application/atom+xml\"/>" . - '</head><body>' . PRE_WRAP; + '</head><body>'; 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 = "<hr />" . PRE_WRAP . "$footer</pre>"; + $footer = "<hr /><pre>$footer</pre>"; } - $html . "</pre>$footer</body></html>"; + $html .= "$footer</body></html>"; } # private subs |