diff --git a/talon/quotations.py b/talon/quotations.py index 58f4465..292b39a 100644 --- a/talon/quotations.py +++ b/talon/quotations.py @@ -97,12 +97,12 @@ RE_ORIGINAL_MESSAGE = re.compile(u'[\s]*[-]+[ ]*({})[ ]*[-]+'.format( 'Oprindelig meddelelse', ))), re.I) -RE_FROM_COLON_OR_DATE_COLON = re.compile('(_+\r?\n)?[\s]*(:?[*]?{}):[*]? .*'.format( - '|'.join(( +RE_FROM_COLON_OR_DATE_COLON = re.compile(u'(_+\r?\n)?[\s]*(:?[*]?{})[\s]?:[*]? .*'.format( + u'|'.join(( # "From" in different languages. 'From', 'Van', 'De', 'Von', 'Fra', # "Date" in different languages. - 'Date', 'Datum', + 'Date', 'Datum', u'Envoyé' ))), re.I) SPLITTER_PATTERNS = [ diff --git a/tests/text_quotations_test.py b/tests/text_quotations_test.py index a19cee9..b68b132 100644 --- a/tests/text_quotations_test.py +++ b/tests/text_quotations_test.py @@ -255,10 +255,10 @@ def test_french_multiline_from_block(): eq_('Lorem ipsum', quotations.extract_from_plain( u"""Lorem ipsum -De: Brendan xxx [mailto:brendan.xxx@xxx.com] -Envoyé: vendredi 23 janvier 2015 16:39 -À: Camille XXX -Objet: Follow Up +De : Brendan xxx [mailto:brendan.xxx@xxx.com] +Envoyé : vendredi 23 janvier 2015 16:39 +À : Camille XXX +Objet : Follow Up Blah-blah-blah """))