Fix tests

This commit is contained in:
pietervdvn 2022-09-10 14:46:04 +02:00
parent 71a70daec2
commit 20e5e39921

View file

@ -354,11 +354,11 @@ export class TagUtils {
value: string value: string
modifier: "i" | "" modifier: "i" | ""
} | null { } | null {
const match = tag.match(/^([_a-zA-Z0-9: -|]+)(!)?~([i]~)?(.*)$/) const match = tag.match(/^([_|a-zA-Z0-9: -]+)(!)?~([i]~)?(.*)$/)
if (match == null) { if (match == null) {
return null return null
} }
const [, key, invert, modifier, value] = match const [_, key, invert, modifier, value] = match
return { key, value, invert: invert == "!", modifier: modifier == "i~" ? "i" : "" } return { key, value, invert: invert == "!", modifier: modifier == "i~" ? "i" : "" }
} }