diff --git a/talon/quotations.py b/talon/quotations.py index 9286209..7eb16ad 100644 --- a/talon/quotations.py +++ b/talon/quotations.py @@ -42,6 +42,8 @@ RE_ON_DATE_SMB_WROTE = re.compile( u'På', # Swedish, Danish 'Den', + # Vietnamese + u'Vào', )), # Date and sender separator u'|'.join(( @@ -64,6 +66,8 @@ RE_ON_DATE_SMB_WROTE = re.compile( 'schrieb', # Norwegian, Swedish 'skrev', + # Vietnamese + u'đã viết', )) )) # Special case for languages where text is translated like this: 'on {date} wrote {somebody}:' diff --git a/tests/text_quotations_test.py b/tests/text_quotations_test.py index c02c375..4163774 100644 --- a/tests/text_quotations_test.py +++ b/tests/text_quotations_test.py @@ -401,6 +401,14 @@ Op 17-feb.-2015, om 13:18 heeft Julius Caesar het volgende g Small batch beard laboris tempor, non listicle hella Tumblr heirloom. """)) +def test_vietnamese_from_block(): + eq_('Hello', quotations.extract_from_plain( + u"""Hello + +Vào 14:24 8 tháng 6, 2017, Hùng Nguyễn đã viết: + +> Xin chào +""")) def test_quotation_marker_false_positive(): msg_body = """Visit us now for assistance...