lets work alright?

This commit is contained in:
Nuckyz 2024-11-03 14:01:56 -03:00
parent d099aff45a
commit e0098deaab
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -26,7 +26,7 @@ export function canonicalizeMatch<T extends RegExp | string>(match: T): T {
const isStr = typeof match === "string"; const isStr = typeof match === "string";
return /^[\d]/.test(hashed) || !/^[\w$]+$/.test(hashed) return /^[\d]/.test(hashed) || !/^[\w$]+$/.test(hashed)
? isStr ? `["${hashed}` : String.raw`(?:\["${hashed}"\])` ? isStr ? `["${hashed}` : String.raw`(?:\["${hashed})`
: isStr ? `.${hashed}` : String.raw`(?:\.${hashed})`; : isStr ? `.${hashed}` : String.raw`(?:\.${hashed})`;
}); });