mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user