github / email_reply_parser

Small library to parse plain text email content
MIT License
670 stars 156 forks source link

Not detecting quoted content in emails coming from Mail.app #43

Open jdpopkin opened 9 years ago

jdpopkin commented 9 years ago

See https://github.com/jdpopkin/email_reply_parser/commit/bf9d5ce00f52f9096acf87a60f3ed6134338f03e for an example of this.

jdpopkin commented 9 years ago

It looks like Mail.app adds an extra > before the "On... [name] wrote:" line. This is an excerpt from the email source:

No, it=E2=80=99s just our mail being slow.
> On Oct 6, 2015, at 10:47, Dmitriy Likhten <notifications@github.com> =
wrote:
>=20
> let me know what happens! :)
>=20
> =E2=80=94
> Reply to this email directly or view it on GitHub =
<https://github.com/jdpopkin/email_reply_parser/commit/bf9d5ce00f52f9096ac=
f87a60f3ed6134338f03e#commitcomment-13616669>.
>=20
jdpopkin commented 9 years ago

Actually, the real problem might be the second and third lines from the bottom there - Apple Mail has formatted this URL and broken it up over multiple lines. But it hasn't added a > at the beginning of these lines. So email_reply_parser thinks that those lines are unquoted, and that the previous quoted section is an interleaved quote that shouldn't be hidden.

That sounds fixable, but messy.