mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-10 08:54:40 +00:00
4b68e82a19
Ditto for ending with \b. Consider muting the phrase "(hot take)". I stipulate it is reasonable to enter this with the default "match whole word" behavior. Under the old behavior, this would be encoded as \b\(hot\ take\)\b However, if \b is before the first character in the string and the first character in the string is not a word character, then the match will fail. Ditto for after. In our example, "(" is not a word character, so this will not match statuses containing "(hot take)", and that's a very surprising behavior. To address this, we only add leading and trailing \b to keywords that start or end with word characters. |
||
---|---|---|
.. | ||
keyword_mute_spec.rb |