user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] view: add extra newline in flat thread view for lynx
@ 2016-04-24 23:54 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-04-24 23:54 UTC (permalink / raw)
  To: meta

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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 3b2df46..0e65dac 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -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>');
 }
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-24 23:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-24 23:54 [PATCH] view: add extra newline in flat thread view for lynx Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).