nyastodon/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 Add scenarios for log in (#3497) 2017-06-01 17:25:59 +02:00
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 Spec UserMailer (#3757) 2017-06-17 01:15:00 +02:00
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 Add status destroy authorization to policy (#3453) 2017-05-30 22:56:31 +02:00
presenters Use around hook to restore context in InstancePresenter spec (#3430) 2017-05-30 09:03:35 -04:00
requests Redesign the landing page, mount public timeline on it (#4122) 2017-07-11 15:27:59 +02:00
routing Move create/destroy actions for api/v1/statuses to namespace (#3678) 2017-06-10 09:39:26 +02:00
services Merge remote-tracking branch 'origin/master' into gs-master 2017-10-16 01:29:02 -05:00
support Some minor change and spec for Account (#3813) 2017-06-22 18:34:27 +02:00
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