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:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user