Adding ':' as a supported character in Macros.

Summary: Adding ':' in order to support SA-style smiley conventions (e.g: :allears:) in Phabricator.

Test Plan: Tested working on local Phabricator copy.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D4727
This commit is contained in:
Jerrad Thramer
2013-01-29 14:22:36 -08:00
committed by epriestley
parent 1ebd51aad2
commit fd6a13558f
2 changed files with 5 additions and 5 deletions

View File

@@ -39,10 +39,10 @@ final class PhabricatorMacroEditController
if (!strlen($macro->getName())) {
$errors[] = pht('Macro name is required.');
$e_name = pht('Required');
} else if (!preg_match('/^[a-z0-9_-]{3,}$/', $macro->getName())) {
$errors[] = pht('Macro must be at least three characters long and '.
'contain only lowercase letters, digits, hyphen and '.
'underscore.');
} else if (!preg_match('/^[a-z0-9:_-]{3,}$/', $macro->getName())) {
$errors[] = pht(
'Macro must be at least three characters long and contain only '.
'lowercase letters, digits, hyphens, colons and underscores.');
$e_name = pht('Invalid');
} else {
$e_name = null;