Merge pull request #61 from tgwizard/fix-for-apple-mail
Add fix for Apple Mail email format
This commit is contained in:
@@ -22,7 +22,7 @@ log = logging.getLogger(__name__)
|
||||
RE_FWD = re.compile("^[-]+[ ]*Forwarded message[ ]*[-]+$", re.I | re.M)
|
||||
|
||||
RE_ON_DATE_SMB_WROTE = re.compile(
|
||||
u'(-*[ ]?({0})[ ].*({1})(.*\n){{0,2}}.*({2}):?-*)'.format(
|
||||
u'(-*[>]?[ ]?({0})[ ].*({1})(.*\n){{0,2}}.*({2}):?-*)'.format(
|
||||
# Beginning of the line
|
||||
u'|'.join((
|
||||
# English
|
||||
@@ -59,7 +59,7 @@ RE_ON_DATE_SMB_WROTE = re.compile(
|
||||
))
|
||||
# Special case for languages where text is translated like this: 'on {date} wrote {somebody}:'
|
||||
RE_ON_DATE_WROTE_SMB = re.compile(
|
||||
u'(-*[ ]?({0})[ ].*(.*\n){{0,2}}.*({1})[ ]*.*:)'.format(
|
||||
u'(-*[>]?[ ]?({0})[ ].*(.*\n){{0,2}}.*({1})[ ]*.*:)'.format(
|
||||
# Beginning of the line
|
||||
u'|'.join((
|
||||
'Op',
|
||||
|
||||
19
tests/fixtures/standard_replies/apple_mail_2.eml
vendored
Normal file
19
tests/fixtures/standard_replies/apple_mail_2.eml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Content-Type: text/plain;
|
||||
charset=us-ascii
|
||||
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
|
||||
Subject: Re: Hello there
|
||||
X-Universally-Unique-Identifier: 85B1075D-5841-46A9-8565-FCB287A93AC4
|
||||
From: Adam Renberg <adam@tictail.com>
|
||||
In-Reply-To: <CABzQGhkMXDxUt_tSVQcg=43aniUhtsVfCZVzu-PG0kwS_uzqMw@mail.gmail.com>
|
||||
Date: Sat, 22 Aug 2015 19:22:20 +0200
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Smtp-Server: smtp.gmail.com:adam@tictail.com
|
||||
Message-Id: <68001B29-8EA4-444C-A894-0537D2CA5208@tictail.com>
|
||||
References: <CABzQGhkMXDxUt_tSVQcg=43aniUhtsVfCZVzu-PG0kwS_uzqMw@mail.gmail.com>
|
||||
To: Adam Renberg <tgwizard@gmail.com>
|
||||
|
||||
Hello
|
||||
> On 22 Aug 2015, at 19:21, Adam Renberg <tgwizard@gmail.com> wrote:
|
||||
>
|
||||
> Hi there!
|
||||
|
||||
Reference in New Issue
Block a user