mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] Fix word bounds on filters, where they would only be applied at the beginning [MDB IGNORE] (#8444)
* Fix word bounds on filters, where they would only be applied at the beginning (#61714) * Fix word bounds on filters, where they would only be applied at the beginning Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
@@ -427,7 +427,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