-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve chat markdown and regex filters
- Loading branch information
1 parent
b3aa0ca
commit 844329c
Showing
3 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/decl/chat_filter/regexp | ||
filter_category = /decl/chat_filter/regexp | ||
abstract_type = /decl/chat_filter/regexp | ||
var/regex/filter_regex | ||
|
||
/decl/chat_filter/regexp/match(var/message) | ||
. = filter_regex && findtext(message, filter_regex) | ||
filter_regex.index = 0 // we use the global flag, so we need to reset this for every match or else repeat messages will break | ||
. = filter_regex && filter_regex.Find(message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters