mirror of
https://github.com/charliegerard/safe-space.git
synced 2024-09-11 04:46:17 +03:00
Simplify gmail email chain regex
This commit is contained in:
parent
855fe2f2ba
commit
a704fe0dc8
@ -10,7 +10,7 @@ module.exports = async function filterEmailChain(issueComment) {
|
||||
* @type {RegExp}
|
||||
*/
|
||||
const OUTLOOK_EMAIL_REGEX = /^\s*(From:.*[^]*)\b(?:unsubscribe.)$/gm;
|
||||
const GMAIL_EMAIL_REGEX = /^\s*(on .*[^]*)\b(wrote:.*[^]*)+(reply to this email directly,.*[^]*)+>(.*\s*)$/gm;
|
||||
const GMAIL_EMAIL_REGEX = /^>.*(?:wrote:)(\s*.*)+(or unsubscribe\.)$/gm;
|
||||
|
||||
if (issueComment.match(OUTLOOK_EMAIL_REGEX) !== null) {
|
||||
console.log('Filtering issue comment for outlook remenants');
|
||||
|
Loading…
Reference in New Issue
Block a user