mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
label match wildcard
This commit is contained in:
parent
3544dd1709
commit
c022cf0a22
1 changed files with 3 additions and 1 deletions
|
|
@ -1433,7 +1433,9 @@ export const filterItemEvents = (
|
|||
return labelsToTest.some((label) => {
|
||||
const hasWildcard = label.includes('*')
|
||||
if (hasWildcard) {
|
||||
return labels?.some((l) => l.match(new RegExp(label, 'i')))
|
||||
return labels?.some(
|
||||
(l) => l.match(new RegExp(label.replace('*', '.*'), 'i')) // match wildcard
|
||||
)
|
||||
}
|
||||
|
||||
return labels?.some((l) => l.toLowerCase() === label)
|
||||
|
|
|
|||
Loading…
Reference in a new issue