メール内のコードブロックに空の改行があります

Code blocks appear to be formatted with an empty newline between each line ONLY in the HTML portion of emails. They appear correctly on both the forum itself, and in the plain text portion of the email. This is not an email formatting / CSS problem - there is an actual newline inserted in the source ONLY in the email case.

An example: [iFFT Freeze/Scrub - #25 by toneburst - Questions - scsynth]

The original source text of the post looks like:

The formatted post on the website looks like:

The HTML email received, however, looks like:

In the source for the email, you can see that all newlines have been doubled:

「いいね!」 4

I agree, this is tends to look quite off.

@techAPJ can you investigate?

「いいね!」 3

I am unable to repro this on latest Discourse version.

HTML:

Text:

This might be an issue with your email client.

2.9.0.beta1 から送信されたメールで問題が引き続き発生しています。それ以降に修正されている場合は、このメッセージの残りは無視してください :slight_smile:

これは特定のメールクライアントに関連する問題ではありません。2番目のスクリーンショットは、メール用に生成されているHTMLの生のコードです。しかし、実際のメールの内容(抜粋…)を見る方がより分かりやすいでしょう。

<pre style="word-wrap: break-word; max-width: 694px;"><code style="display: block; background-color: #f9f9f9; overflow: auto; padding: 5px;; background-color: #f9f9f9; padding: 2px 5px;">=0D
// This expects two keys to be defined: ~history (the list) and ~recordKey (which key to record)=0D
Pdef(\keyRecorder, Pbind(=0D
	\callback, Pfunc({=0D
		|event|=0D
		event[\callback].addFunc({ // combine your record func with any previous callback that was there (it's okay if its nil)=0D
			~history.add(currentEnvironment[~recordKey])=0D
		}).postln;=0D
	})=0D
));=0D
=0D

明確に、(a) コード内の改行があるべき場所に実際の改行があり、(b) 各行の末尾に=0D(キャリッジリターン)文字があります。私の知る限り、<pre>内のすべての改行は文字通り解釈されるはずであり、これが二重改行を説明しています。

Gmailでこの問題を再現でき、メールメッセージのHTML部分をブラウザで直接開く(=0Dのような引用符付き印刷文字を置き換えた後)ことでも再現できます。これにより、疑問が生じます。

  • あなたが投稿したメールの生のバージョンを見たとき、同じ(改行と=0D)が見えますか?
  • もしそうなら、あなたが投稿した「正しい」表示のHTMLソースはどのようになっていますか?あなたのメールクライアントは=0D(または改行)を何らかの方法で削除していますか?

いずれにしても、Gmail固有の問題であったとしても、Gmailは圧倒的に最も一般的なメールクライアントであるため、少なくとも調べる価値はあるでしょう。