* [PATCH 3/3] view: minor tweaks to reduce long lines
2016-06-18 4:47 6% [PATCH 0/3] introduce WwwStream for per-message views Eric Wong
@ 2016-06-18 4:47 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-06-18 4:47 UTC (permalink / raw)
To: meta
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;
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] introduce WwwStream for per-message views
@ 2016-06-18 4:47 6% Eric Wong
2016-06-18 4:47 7% ` [PATCH 3/3] view: minor tweaks to reduce long lines Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-06-18 4:47 UTC (permalink / raw)
To: meta
It will be considerably more work to port the rest of
the stuff over, but this is a start...
Eric Wong (3):
feed: split out top-of-page generation
view: introduce WwwStream interface
view: minor tweaks to reduce long lines
lib/PublicInbox/Feed.pm | 36 ++++++++++--------
lib/PublicInbox/View.pm | 63 +++++++++++++------------------
lib/PublicInbox/WwwStream.pm | 88 ++++++++++++++++++++++++++++++++++++++++++++
t/view.t | 14 ++++++-
4 files changed, 146 insertions(+), 55 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-06-18 4:47 6% [PATCH 0/3] introduce WwwStream for per-message views Eric Wong
2016-06-18 4:47 7% ` [PATCH 3/3] view: minor tweaks to reduce long lines 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).