user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] lei -f reply: fix Cc: header combining
@ 2021-09-26  1:42 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-09-26  1:42 UTC (permalink / raw)
  To: meta

When combining lines from To: and Cc: headers, ", " needs to be
used to separate them.
---
 lib/PublicInbox/LeiViewText.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/LeiViewText.pm b/lib/PublicInbox/LeiViewText.pm
index 34612711..1f002ccd 100644
--- a/lib/PublicInbox/LeiViewText.pm
+++ b/lib/PublicInbox/LeiViewText.pm
@@ -96,10 +96,11 @@ sub quote_hdr_buf ($$) {
 	for my $f (qw(To Cc)) {
 		for my $v ($eml->header_raw($f)) {
 			next if $v !~ /\S/;
-			$cc .= $v;
+			$cc .= ", $v";
 			$to //= $v;
 		}
 	}
+	substr($cc, 0, 2, ''); # s/^, //;
 	PublicInbox::View::fold_addresses($to);
 	PublicInbox::View::fold_addresses($cc);
 	_xs($to);

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

only message in thread, other threads:[~2021-09-26  1:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-26  1:42 [PATCH] lei -f reply: fix Cc: header combining 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).