Page MenuHomePhabricator

Stop all object mentions from matching after "@"
ClosedPublic

Authored by epriestley on Sep 29 2015, 11:10 AM.
Tags
None
Referenced Files
F15540862: D14186.id34270.diff
Fri, Apr 25, 9:26 AM
F15534328: D14186.id34272.diff
Wed, Apr 23, 11:46 PM
F15495970: D14186.id34270.diff
Sun, Apr 13, 5:53 AM
F15492285: D14186.id34271.diff
Sat, Apr 12, 1:03 PM
F15487435: D14186.id34269.diff
Thu, Apr 10, 1:58 PM
F15482089: D14186.diff
Wed, Apr 9, 2:50 AM
F15478495: D14186.id.diff
Mon, Apr 7, 11:57 PM
F15475334: D14186.id34276.diff
Sun, Apr 6, 6:34 PM
Subscribers
None

Details

Summary

Fixes T9479. Currently, @aaaaaaaa may try to match as a commit hash, and @C123456 may try to match as a Countdown reference. These should only match as user mentions.

Prevent object mention rules from matching after @. We already prevent them after - and #, and already prevented the username rule after @ (i.e., preventing @@user).

Test Plan

Created some "interesting" users locally and @mentioned them:

Screen Shot 2015-09-29 at 4.08.02 AM.png (582×556 px, 46 KB)

Diff Detail

Repository
rP Phabricator
Branch
objmention
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8085
Build 9200: [Placeholder Plan] Wait for 30 Seconds
Build 9199: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Stop all object mentions from matching after "@".
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

Slightly more correct patch: [#-@] is a character range which includes more characters than intended.

Use [#@-] instead (which is #, @ and - only).

  • Add test coverage for the commit reference use case.
  • Minor consistency tweak to comment.
chad edited edge metadata.
This revision is now accepted and ready to land.Sep 29 2015, 1:42 PM
This revision was automatically updated to reflect the committed changes.