The word filter will now be less scared of double or trailing spaces (#62703)

It kept on tripping because the RegEx expression was malformed due to an absence of words in to_join_on_whitespace_splits, which caused it to filter out spaces that were at the beginning or at the end of a message, or if there was two spaces one by the other.

Also prevents people from sending a message that's only spaces in OOC, because that's a little silly.
This commit is contained in:
GoldenAlpharex
2021-11-10 18:26:53 +00:00
committed by GitHub
parent ac051ebe3f
commit d407799f4a
3 changed files with 13 additions and 3 deletions
+8
View File
@@ -50,6 +50,14 @@
BLOCKED_SHARED,
)
test_filter(
" This message has a space at the beginning, a double space, and a space at the end, but it's fine! ",
null,
null,
null,
null,
)
/datum/unit_test/chat_filter_sanity/proc/test_filter(
message,
blocked_word,