From 389ea6cf34e33aada72d956e583a76686d7f0771 Mon Sep 17 00:00:00 2001 From: Corban-Lee Date: Tue, 13 May 2025 16:58:59 +0100 Subject: [PATCH] note --- src/bot/filter.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bot/filter.ts b/src/bot/filter.ts index bfafaf6..f7dcf6f 100644 --- a/src/bot/filter.ts +++ b/src/bot/filter.ts @@ -18,6 +18,11 @@ export const any = (filter: Filter, input: string) => { // console.log(JSON.stringify(words)); // return words.some(word => new RegExp(`\\b${word}\\b`).test(input)); + // TODO: + // The below code works, but I'd like to use regex as was done in pyrss. + // The above commented code does not work, figure it out. + + const inputWords = input.split(" ").map(word => filter.is_insensitive ? word.toLowerCase() : word); const filterWords = filter.value.split(" ").map(word => filter.is_insensitive ? word.toLowerCase() : word);