Page MenuHomePhabricator

Stop all object mentions from matching after "@"
ClosedPublic

Authored by epriestley on Sep 29 2015, 11:10 AM.
Tags
None
Referenced Files
F13247626: D14186.id34272.diff
Thu, May 23, 9:05 PM
F13219094: D14186.diff
Sat, May 18, 3:18 PM
F13215284: D14186.id.diff
Fri, May 17, 4:20 PM
F13193661: D14186.id34269.diff
Sun, May 12, 4:30 PM
F13191179: D14186.id34276.diff
Sat, May 11, 5:41 PM
F13174065: D14186.id34270.diff
Tue, May 7, 9:54 PM
F13174064: D14186.id34272.diff
Tue, May 7, 9:54 PM
F13174063: D14186.id34269.diff
Tue, May 7, 9:54 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 8086
Build 9202: [Placeholder Plan] Wait for 30 Seconds
Build 9201: 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.