mastodon/spec
David Yip 4b68e82a19 Don't add \b to whole-word keywords that don't start with word characters.
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.
2017-10-22 00:38:54 -05:00
..
controllers Set up /settings/keyword_mutes. #164. 2017-10-21 14:54:36 -05:00
fabricators Apply keyword mutes to reblogs. 2017-10-21 15:44:47 -05:00
features
fixtures Custom emoji (#4988) 2017-09-19 02:42:40 +02:00
helpers Set up /settings/keyword_mutes. #164. 2017-10-21 14:54:36 -05:00
lib keyword mutes: also check spoiler (CW) text and reblogged statuses. 2017-10-22 00:38:53 -05:00
mailers
models Don't add \b to whole-word keywords that don't start with word characters. 2017-10-22 00:38:54 -05:00
policies
presenters
requests Redesign the landing page, mount public timeline on it (#4122) 2017-07-11 15:27:59 +02:00
routing
services Merge remote-tracking branch 'origin/master' into gs-master 2017-10-16 01:29:02 -05:00
support
validators Fix StatusLengthValidator tests 2017-09-02 11:37:40 -05:00
views fix haml quotes in a bid to make travis less grumpy 2017-10-06 09:07:04 +02:00
workers Clean up reblog tracking keys, related improvements (#5428) 2017-10-17 11:45:06 +02:00
rails_helper.rb Fix #4058 - Use a long-lived cookie to keep track of user-level sessions (#4091) 2017-07-07 23:25:15 +02:00
spec_helper.rb Minor performance improvement for test suite (#4678) 2017-08-24 13:31:55 +02:00