user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 3/3] view: minor tweaks to reduce long lines
Date: Sat, 18 Jun 2016 04:47:05 +0000	[thread overview]
Message-ID: <20160618044705.8337-4-e@80x24.org> (raw)
In-Reply-To: <20160618044705.8337-1-e@80x24.org>

Fold addressee fields to better delimit destinations,
reduce horizontal rule <hr /> to reduce scrolling,
and use spaces to indent "git send-email" example.
---
 lib/PublicInbox/View.pm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index e7e387d..e6d30a8 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -34,7 +34,7 @@ sub msg_html {
 				'</pre><hr />'
 		} elsif ($nr == 2) {
 			'<pre>' . html_footer($hdr, 1, $ctx) .
-			'</pre>' . msg_reply($ctx, $hdr) . '<hr />'
+			'</pre>' . msg_reply($ctx, $hdr);
 		} else {
 			undef
 		}
@@ -50,15 +50,15 @@ sub msg_reply {
 	my ($arg, $link) = mailto_arg_link($hdr);
 	push @$arg, '/path/to/YOUR_REPLY';
 
-	"<hr /><pre\nid=R>".
+	"<pre\nid=R>".
 	"You may reply publically to <a\nhref=#t>this message</a> via\n".
 	"plain-text email using any one of the following methods:\n\n" .
 	"* Save the following mbox file, import it into your mail client,\n" .
 	"  and reply-to-all from there: <a\nhref=raw>mbox</a>\n\n" .
 	"* Reply to all the recipients using the <b>--to</b>, <b>--cc</b>,\n" .
 	"  and <b>--in-reply-to</b> switches of git-send-email(1):\n\n" .
-	"\tgit send-email \\\n\t\t" .
-	join(" \\\n\t\t", @$arg ). "\n\n" .
+	"  git send-email \\\n    " .
+	join(" \\\n    ", @$arg ). "\n\n" .
 	qq(  <a\nhref="$se_url">$se_url</a>\n\n) .
 	"* If your mail client supports setting the <b>In-Reply-To</b>" .
 	" header\n  via mailto: links, try the " .
@@ -338,7 +338,9 @@ sub _msg_html_prepare {
 				next;
 			}
 		}
-		$rv .= "$h: " . $v->as_html . "\n";
+		$v = $v->as_html;
+		$v =~ s/(\@[^,]+,) /$1\n\t/g if ($h eq 'Cc' || $h eq 'To');
+		$rv .= "$h: $v\n";
 
 	}
 	$ctx->{-title_html} = join(' - ', @title);
@@ -420,7 +422,7 @@ sub _parent_headers {
 		}
 
 		if (@refs) {
-			$rv .= 'References: '. join(' ', @refs) . "\n";
+			$rv .= 'References: '. join("\n\t", @refs) . "\n";
 		}
 	}
 	$rv;

      parent reply	other threads:[~2016-06-18  4:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18  4:47 [PATCH 0/3] introduce WwwStream for per-message views Eric Wong
2016-06-18  4:47 ` [PATCH 1/3] feed: split out top-of-page generation Eric Wong
2016-06-18  4:47 ` [PATCH 2/3] view: introduce WwwStream interface Eric Wong
2016-06-18  4:47 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160618044705.8337-4-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).