fix: colons were accidentally removed (#255)

This commit is contained in:
idranme 2024-06-27 16:36:58 +08:00 committed by GitHub
parent b27a02cf92
commit 28d3500af3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -438,7 +438,7 @@ export function parseForbidden(input: string) {
.map<Forbidden>((pattern: string) => {
const strict = pattern.endsWith('!')
if (strict) pattern = pattern.slice(0, -1)
pattern = pattern.replace(/[^a-z0-9\u00ff-\uffff]+/g, ' ').trim()
pattern = pattern.replace(/[^a-z0-9\u00ff-\uffff:]+/g, ' ').trim()
return { pattern, strict }
})
}