FIX: Add "On day, name wrote:" quote trigger for emails

This commit is contained in:
riking
2014-09-05 18:26:45 -07:00
parent 4edbb5b98c
commit a0dccf7bc0
2 changed files with 14 additions and 2 deletions

View File

@@ -159,7 +159,8 @@ module Email
(l =~ /via #{SiteSetting.title}(.*)\:$/) ||
# This one might be controversial but so many reply lines have years, times and end with a colon.
# Let's try it and see how well it works.
(l =~ /\d{4}/ && l =~ /\d:\d\d/ && l =~ /\:$/)
(l =~ /\d{4}/ && l =~ /\d:\d\d/ && l =~ /\:$/) ||
(l =~ /On \w+ \d+,? \d+,?.*wrote:/)
# Headers on subsequent lines
break if (0..2).all? { |off| lines[idx+off] =~ REPLYING_HEADER_REGEX }