Frederick888 / external-editor-revived

External Editor Revived is a Thunderbird MailExtension which allows editing emails in programs such as Vim, Neovim, Emacs, etc.
GNU General Public License v3.0
110 stars 6 forks source link

feat(host): CRLF in temporary EML files #55

Closed Frederick888 closed 2 years ago

Frederick888 commented 2 years ago

Description

According to [1], CRLF should be used in EML files regardless of platform. Thunderbird also commits to this standard for better interoperability [2].

And Vim/Neovim actually set fileformat=dos by default for EML files even under Linux/macOS, hence sending CRLF to Thunderbird directly shouldn't be an issue either.

[1] https://datatracker.ietf.org/doc/html/rfc2822 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=503271

Checklist

Is this a breaking change?

No (but slightly risky?).

Actually a small test under Linux showed that even if I send LF to Thunderbird, when the email is sent out, they are all converted to CRLF. So even cases like sending Git patches should be ok, as users must've been dealing with CRLF using Git's CRLF auto conversion already.

Test results

Closes #53