mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-07 00:17:17 +08:00
fix match rule for multi line in testIfJobTitleOrDescriptionSuit
This commit is contained in:
@@ -370,7 +370,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) {
|
|||||||
let isJobNameSuit = matchLogic === JobDetailRegExpMatchLogic.SOME ? false : true
|
let isJobNameSuit = matchLogic === JobDetailRegExpMatchLogic.SOME ? false : true
|
||||||
try {
|
try {
|
||||||
if (expectJobNameRegExpStr.trim()) {
|
if (expectJobNameRegExpStr.trim()) {
|
||||||
const regExp = new RegExp(expectJobNameRegExpStr, 'i')
|
const regExp = new RegExp(expectJobNameRegExpStr, 'im')
|
||||||
isJobNameSuit = regExp.test(jobInfo.jobName?.replace(/\n/g, '') ?? '')
|
isJobNameSuit = regExp.test(jobInfo.jobName?.replace(/\n/g, '') ?? '')
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@@ -378,7 +378,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) {
|
|||||||
let isJobTypeSuit = matchLogic === JobDetailRegExpMatchLogic.SOME ? false : true
|
let isJobTypeSuit = matchLogic === JobDetailRegExpMatchLogic.SOME ? false : true
|
||||||
try {
|
try {
|
||||||
if (expectJobTypeRegExpStr.trim()) {
|
if (expectJobTypeRegExpStr.trim()) {
|
||||||
const regExp = new RegExp(expectJobTypeRegExpStr, 'i')
|
const regExp = new RegExp(expectJobTypeRegExpStr, 'im')
|
||||||
isJobTypeSuit = regExp.test(jobInfo.positionName?.replace(/\n/g, '') ?? '')
|
isJobTypeSuit = regExp.test(jobInfo.positionName?.replace(/\n/g, '') ?? '')
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@@ -386,7 +386,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) {
|
|||||||
let isJobDescSuit = matchLogic === JobDetailRegExpMatchLogic.SOME ? false : true
|
let isJobDescSuit = matchLogic === JobDetailRegExpMatchLogic.SOME ? false : true
|
||||||
try {
|
try {
|
||||||
if (expectJobDescRegExpStr.trim()) {
|
if (expectJobDescRegExpStr.trim()) {
|
||||||
const regExp = new RegExp(expectJobDescRegExpStr, 'i')
|
const regExp = new RegExp(expectJobDescRegExpStr, 'im')
|
||||||
isJobDescSuit = regExp.test(jobInfo.postDescription?.replace(/\n/g, '') ?? '')
|
isJobDescSuit = regExp.test(jobInfo.postDescription?.replace(/\n/g, '') ?? '')
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
Reference in New Issue
Block a user