lib/PublicInbox/Feed.pm | 4 ++-- lib/PublicInbox/Hval.pm | 5 +++++ lib/PublicInbox/SearchView.pm | 2 +- lib/PublicInbox/View.pm | 16 ++++++++-------- diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 1201dd1165a03d3e0fc3ca3ed81b3dfe3bbf735f..68f1e67bf1bba4939df8b66c413a861bee49d018 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -134,9 +134,9 @@ $top = qq{
} . - PublicInbox::View::PRE_WRAP; + PublicInbox::Hval::PRE; } else { - $top = PublicInbox::View::PRE_WRAP . $top . "\n"; + $top = PublicInbox::Hval::PRE . $top . "\n"; } $fh->write("";
+
my $enc_ascii = find_encoding('us-ascii');
sub new {
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index 7f790902ca4c74e83b024196eafa3c47320b866c..ea8a45a4e91f6d4416db9b6792d442d44e150e4a 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -31,7 +31,7 @@ $mset = $ctx->{srch}->query($q->{q}, $opts);
$total = $mset->get_matches_estimated;
};
my $err = $@;
- my $res = html_start($q, $ctx) . PublicInbox::View::PRE_WRAP;
+ my $res = html_start($q, $ctx) . PublicInbox::Hval::PRE;
if ($err) {
$code = 400;
$res .= err_txt($err) . "" . foot($ctx); diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 3c4e9547e5f56808dee6caed782f6303c401168a..68741c5e0366c13c9e1a2bf05d775d87437c621b 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -21,7 +21,6 @@ # TODO: make these constants tunable use constant MAX_INLINE_QUOTED => 12; # half an 80x24 terminal use constant MAX_TRUNC_LEN => 72; -use constant PRE_WRAP => ""; use constant T_ANCHOR => '#u'; use constant INDENT => ' '; @@ -39,7 +38,7 @@ $footer = ''; } headers_to_html_header($mime, $full_pfx, $ctx) . multipart_text_as_html($mime, $full_pfx) . - '
' . PRE_WRAP . + '
' . (INDENT x $level) . ' | ';
}
- $rv .= "" . PRE_WRAP; + $rv .= " | " . PublicInbox::Hval::PRE;
$rv .= "$subj\n";
$rv .= "- $from @ $ts UTC - ";
$rv .= "next";
@@ -206,8 +206,8 @@ $next .= " thread, back to index";
$next .= "\ndownload thread: ";
$next .= "mbox.gz";
$next .= " / follow: Atom feed";
- $cb->write(" " . PRE_WRAP . $next . "\n\n". $foot . - " |