diff options
author | Eric Wong <e@80x24.org> | 2015-08-18 01:11:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-08-18 01:11:59 +0000 |
commit | a79671f4c2f50ecba1271b85051f732b4ee04a46 (patch) | |
tree | b43015d83c8fb871e1313201f1fa666d67161dba /lib/PublicInbox/Search.pm | |
parent | 6a19d29cb98823ee3794d295e122ee265ab3016a (diff) | |
download | public-inbox-a79671f4c2f50ecba1271b85051f732b4ee04a46.tar.gz |
Drop German ("Aw:") support since it's non-standard and is not supported by Mail::Thread and non-English prefixes are more likely to conflict with prefixes used in Free Software development where ("subsection:") prefixes are common and English is the common language. Anyways we don't filter "Vs: " (Finnish) or "Sv: " (Norwegian, Swedish, Danish, Icelandic), either. ref: https://en.wikipedia.org/wiki/RE_(e-mail)#Abbreviations_in_other_languages
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r-- | lib/PublicInbox/Search.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index db86301d..6a05ce7a 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -10,6 +10,10 @@ require PublicInbox::View; use Email::MIME; use PublicInbox::MID qw/mid_clean mid_compressed/; +# This is English-only, everything else is non-standard and may be confused as +# a prefix common in patch emails +our $REPLY_RE = qr/^re:\s+/i; + use constant { TS => 0, # SCHEMA_VERSION history @@ -490,7 +494,7 @@ sub subject_path { $subj =~ s/\A\s+//; $subj =~ s/\s+\z//; - $subj =~ s/^(?:re|aw):\s*//i; # remove reply prefix (aw: German) + $subj =~ s/$REPLY_RE//igo; # remove reply prefix $subj =~ s![^a-zA-Z0-9_\.~/\-]+!_!g; lc($subj); } |