Page MenuHomePhabricator

Stop all object mentions from matching after "@"
ClosedPublic

Authored by epriestley on Sep 29 2015, 11:10 AM.
Tags
None
Referenced Files
F18861720: D14186.diff
Sun, Nov 2, 4:22 PM
F18749054: D14186.id34269.diff
Oct 4 2025, 2:11 AM
F18679555: D14186.id34276.diff
Sep 26 2025, 12:58 AM
F18651912: D14186.id34271.diff
Sep 21 2025, 6:00 AM
F18499146: D14186.diff
Sep 4 2025, 7:27 PM
F18198878: D14186.id34271.diff
Aug 18 2025, 1:21 AM
F17864219: D14186.id.diff
Jul 28 2025, 1:54 AM
F17844138: D14186.id34276.diff
Jul 27 2025, 1:42 AM
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.