When using <ul><li>..., we already setup <pre> tags
in thread_index_entry, so having an extra </pre> tag
causes validation errors.
Fixes: 6ef9b216156c ("view: use <hr> to delineate in /$MID/T/ view")
---
lib/PublicInbox/View.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index e150a01..d6711d5 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -164,13 +164,17 @@ sub index_entry {
"<a\nhref=\"$mhref\">permalink</a>" .
" <a\nhref=\"${mhref}raw\">raw</a>" .
" <a\nhref=\"${mhref}#R\">reply</a>";
+
+ my $hr;
if (my $pct = $ctx->{pct}) { # used by SearchView.pm
$rv .= "\t[relevance $pct->{$mid_raw}%]";
+ $hr = 1;
} elsif ($mapping) {
my $threaded = 'threaded';
my $flat = 'flat';
my $end = '';
if ($ctx->{flat}) {
+ $hr = 1;
$flat = "<b>$flat</b>";
} else {
$threaded = "<b>$threaded</b>";
@@ -180,7 +184,8 @@ sub index_entry {
$rv .= " <a\nhref=#r$id>$ctx->{s_nr}</a>";
}
- $rv .= $more ? '</pre><hr><pre>' : '</pre>';
+ $rv .= $more ? '</pre><hr><pre>' : '</pre>' if $hr;
+ $rv;
}
sub pad_link ($$;$) {
--
EW
--
unsubscribe: [email protected]
archive: https://public-inbox.org/meta/