2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: Another email regexp for quote lines in the format we can recognize including

the site name.
This commit is contained in:
Robin Ward 2013-08-21 16:54:01 -04:00
parent adbb6a19bb
commit ff3b163a78
3 changed files with 36 additions and 0 deletions

View file

@ -93,6 +93,7 @@ module Email
email_year = lines.each_with_index do |l, idx|
break if l =~ /\A\s*\-{3,80}\s*\z/ ||
l =~ Regexp.new("\\A\\s*" + I18n.t('user_notifications.previous_discussion') + "\\s*\\Z") ||
(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 =~ /\:$/)