]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: add extra newline in flat thread view for lynx
authorEric Wong <e@80x24.org>
Sun, 24 Apr 2016 23:52:00 +0000 (23:52 +0000)
committerEric Wong <e@80x24.org>
Sun, 24 Apr 2016 23:54:01 +0000 (23:54 +0000)
This shouldn't show up in other browsers (tested with w3m, too),
but the extra newline makes a difference for delineating
messages when viewed with lynx.

lib/PublicInbox/View.pm

index 3b2df463f31f8bd8a7a065b95cc995e606d46a26..0e65daca1c69eb9386b18fe628331ff73ee0bdd0 100644 (file)
@@ -154,13 +154,15 @@ sub index_entry {
        } elsif ($srch) {
                my $threaded = 'threaded';
                my $flat = 'flat';
+               my $end = '';
                if ($ctx->{flat}) {
                        $flat = "<b>$flat</b>";
+                       $end = "\n"; # for lynx
                } else {
                        $threaded = "<b>$threaded</b>";
                }
                $rv .= " [<a\nhref=\"${path}$href/t/#u\">$threaded</a>";
-               $rv .= "|<a\nhref=\"${path}$href/T/#u\">$flat</a>]";
+               $rv .= "|<a\nhref=\"${path}$href/T/#u\">$flat</a>]$end";
        }
        $fh->write($rv .= '</pre>');
 }