[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:
SkyratBot
2021-09-28 04:50:38 +01:00
committed by GitHub
co-authored by Mothblocks
parent 7269d25d20
commit 460b6e653c
2 changed files with 9 additions and 1 deletions
@@ -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.