-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inverse Matching Bug #58
Comments
This has been here since 1.6. This happens because it parses the message by line. In 1.7, the entire message is sent on one line instead of the server splitting it for us. The main reason is me being too lazy to change it to split right before it's rendered. |
I think I might remove the inverse option. It's something you can do easily in regex anyway by pre-pending '!'. I tested this with the expression "^<", and inverted, matching not speech, and sent it to a tab. I was unable to reproduce no matter the length of my message. When I colored it though, only the first line was effected. I'm going to fix that, and hopefully, this issue will get fixed with it. |
As far as I know you actually can't just pre-pend the regex with an '!' to invert it. This must be done with the negative lookahead assertion '?!' like so: (?!foo). Simply adding an '!' in front will return no results, which may be the reason why you were unable to reproduce it. A brief example: foo Searching for "(?!foo)" returns "bar" & "cat". I tested your same expression "^<", inverted it like so "^(?!<)", and sent it to a tab. I was able to successfully reproduce the multiple lines issue. I am not sure how you inverted it in your test, but please try entering the "/help" command in game to make sure that the filter is working properly. It should filter out player chat and still display the help page. |
Your filter is wrong. It should be this. |
Using these settings to filter out certain messages. Inverse matching works correctly when the message is short and only takes up a single line. Inverse matching fails when the message is long enough that it wraps to the next line(s).
Expected Result: All of those [G] and [Tr] messages should be filtered out.
Actual Result: Single line messages are filtered out, multiple line messages are not.
Note: Filtering messages with 'Inverse match' unchecked has no issues when they are single or multiple lines.
The text was updated successfully, but these errors were encountered: