diff --git a/src/applications/diffusion/remarkup/__tests__/DiffusionCommitRemarkupRuleTestCase.php b/src/applications/diffusion/remarkup/__tests__/DiffusionCommitRemarkupRuleTestCase.php --- a/src/applications/diffusion/remarkup/__tests__/DiffusionCommitRemarkupRuleTestCase.php +++ b/src/applications/diffusion/remarkup/__tests__/DiffusionCommitRemarkupRuleTestCase.php @@ -121,6 +121,25 @@ ), ), ), + + // After an "@", we should not be recognizing references because these + // are username mentions. + 'deadbeef' => array( + 'embed' => array( + ), + 'ref' => array( + array( + 'offset' => 0, + 'id' => 'deadbeef', + ), + ), + ), + '@deadbeef' => array( + 'embed' => array( + ), + 'ref' => array( + ), + ), ); foreach ($cases as $input => $expect) { diff --git a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php --- a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php +++ b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php @@ -209,13 +209,14 @@ $boundary = '\\B'; } - // The "(?