From 2b4b62097730bf0388f2179c02fdead281ec26fc Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Mon, 15 Dec 2025 18:00:11 +0800 Subject: [PATCH] fix match rule for multi line in `testIfJobTitleOrDescriptionSuit` --- packages/geek-auto-start-chat-with-boss/index.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/geek-auto-start-chat-with-boss/index.mjs b/packages/geek-auto-start-chat-with-boss/index.mjs index 0d62cc2..9224f18 100644 --- a/packages/geek-auto-start-chat-with-boss/index.mjs +++ b/packages/geek-auto-start-chat-with-boss/index.mjs @@ -370,7 +370,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) { let isJobNameSuit = matchLogic === JobDetailRegExpMatchLogic.SOME ? false : true try { if (expectJobNameRegExpStr.trim()) { - const regExp = new RegExp(expectJobNameRegExpStr, 'i') + const regExp = new RegExp(expectJobNameRegExpStr, 'im') isJobNameSuit = regExp.test(jobInfo.jobName?.replace(/\n/g, '') ?? '') } } catch { @@ -378,7 +378,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) { let isJobTypeSuit = matchLogic === JobDetailRegExpMatchLogic.SOME ? false : true try { if (expectJobTypeRegExpStr.trim()) { - const regExp = new RegExp(expectJobTypeRegExpStr, 'i') + const regExp = new RegExp(expectJobTypeRegExpStr, 'im') isJobTypeSuit = regExp.test(jobInfo.positionName?.replace(/\n/g, '') ?? '') } } catch { @@ -386,7 +386,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) { let isJobDescSuit = matchLogic === JobDetailRegExpMatchLogic.SOME ? false : true try { if (expectJobDescRegExpStr.trim()) { - const regExp = new RegExp(expectJobDescRegExpStr, 'i') + const regExp = new RegExp(expectJobDescRegExpStr, 'im') isJobDescSuit = regExp.test(jobInfo.postDescription?.replace(/\n/g, '') ?? '') } } catch {