We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76d0e8f commit 5ff2820Copy full SHA for 5ff2820
lib/message-handler.js
@@ -1456,12 +1456,13 @@ class MessageHandler {
1456
options = options || {};
1457
subject = subject.replace(/\s+/g, ' ').trim();
1458
1459
+ // `Re: [EXTERNAL] Re: Fwd: Example subject (fwd)` becomes `Example subject`
1460
if (options.removePrefix) {
1461
let match = true;
1462
while (match) {
1463
match = false;
1464
subject = subject
- .replace(/^(re|fwd?)\s*:|\s*\(fwd\)\s*$/gi, () => {
1465
+ .replace(/^(re|fwd?)\s*:|^\[.+?\](?=\s.+)|\s*\(fwd\)\s*$/gi, () => {
1466
match = true;
1467
return '';
1468
})
0 commit comments