mirror of
https://we.phorge.it/source/phorge.git
synced 2024-09-20 09:18:48 +02:00
Fix quick create on mobile
Summary: Fixes T4903. At some point maybe-soonish we should maybe go make `"device" => true` the default, and put `"device" => "hella-busted"` on the remaining bad pages. Test Plan: L@@K @ W/ iOS Simulator Reviewers: chad Reviewed By: chad Subscribers: epriestley, k Maniphest Tasks: T4903 Differential Revision: https://secure.phabricator.com/D8863
This commit is contained in:
parent
b53a9f0e12
commit
8fc5977b9a
2 changed files with 5 additions and 1 deletions
|
@ -29,6 +29,7 @@ final class PhabricatorHomeQuickCreateController
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => pht('Quick Create'),
|
'title' => pht('Quick Create'),
|
||||||
|
'device' => true,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,10 @@ final class PhabricatorRemarkupRuleMention
|
||||||
// username, so we'll incorrectly pick it up, but there's little to be done
|
// username, so we'll incorrectly pick it up, but there's little to be done
|
||||||
// about that. We forbid terminal periods so that we can correctly capture
|
// about that. We forbid terminal periods so that we can correctly capture
|
||||||
// "@joe" instead of "@joe." in "Hey, @joe.".
|
// "@joe" instead of "@joe." in "Hey, @joe.".
|
||||||
const REGEX = '/(?<!\w)@([a-zA-Z0-9._-]*[a-zA-Z0-9_-])/';
|
//
|
||||||
|
// We disallow "@@joe" because it creates a false positive in the common
|
||||||
|
// construction "l@@k", made popular by eBay.
|
||||||
|
const REGEX = '/(?<!\w|@)@([a-zA-Z0-9._-]*[a-zA-Z0-9_-])/';
|
||||||
|
|
||||||
public function apply($text) {
|
public function apply($text) {
|
||||||
return preg_replace_callback(
|
return preg_replace_callback(
|
||||||
|
|
Loading…
Reference in a new issue