mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
Fix word bounds on filters, where they would only be applied at the beginning (#61714)
This commit is contained in:
@@ -430,7 +430,7 @@ Example config:
|
||||
to_join_on_whitespace_splits += REGEX_QUOTE(banned_word)
|
||||
|
||||
var/whitespace_split = @"(?:(?:^|\s+)(" + jointext(to_join_on_whitespace_splits, "|") + @")(?:$|\s+))"
|
||||
var/word_bounds = @"(\b(" + jointext(to_join_on_word_bounds, "|") + "))"
|
||||
var/word_bounds = @"(\b(" + jointext(to_join_on_word_bounds, "|") + @")\b)"
|
||||
return regex("([whitespace_split]|[word_bounds])", "i")
|
||||
|
||||
//Message admins when you can.
|
||||
|
||||
Reference in New Issue
Block a user