Page MenuHomePhabricator

Stop all object mentions from matching after "@"
ClosedPublic

Authored by epriestley on Sep 29 2015, 11:10 AM.
Tags
None
Referenced Files
F14759287: D14186.id.diff
Wed, Jan 22, 11:56 AM
Unknown Object (File)
Fri, Jan 17, 5:17 AM
Unknown Object (File)
Fri, Jan 17, 4:10 AM
Unknown Object (File)
Thu, Jan 9, 3:21 PM
Unknown Object (File)
Fri, Jan 3, 8:34 PM
Unknown Object (File)
Dec 5 2024, 5:39 PM
Unknown Object (File)
Nov 28 2024, 12:22 AM
Unknown Object (File)
Nov 23 2024, 1:04 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 8084
Build 9198: [Placeholder Plan] Wait for 30 Seconds
Build 9197: 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.