diff --git a/src/config.ts b/src/config.ts index f1d826a..ca07d28 100644 --- a/src/config.ts +++ b/src/config.ts @@ -278,7 +278,7 @@ export function parseInput(input: string, config: Config, forbidden: Forbidden[] // remove forbidden words const positive = input.split(/,\s*/g).filter((word) => { - word = word.replace(/[^a-z0-9]+/g, ' ').trim() + word = word.replace(/[\x00-\x7f]/g, s => s.replace(/[^0-9a-zA-Z]/, ' ')).replace(/\s+/, ' ').trim() if (!word) return false for (const { pattern, strict } of forbidden) { if (strict && word.split(/\W+/g).includes(pattern)) {