diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 420718ba6e..9965c7b12e 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -220,6 +220,8 @@ phutil_register_library_map(array( 'PhabricatorPeopleEditController' => 'applications/people/controller/edit', 'PhabricatorPeopleListController' => 'applications/people/controller/list', 'PhabricatorPeopleProfileController' => 'applications/people/controller/profile', + 'PhabricatorRemarkupRuleDifferential' => 'infrastructure/markup/remarkup/markuprule/differential', + 'PhabricatorRemarkupRuleManiphest' => 'infrastructure/markup/remarkup/markuprule/maniphest', 'PhabricatorStandardPageView' => 'view/page/standard', 'PhabricatorTypeaheadCommonDatasourceController' => 'applications/typeahead/controller/common', 'PhabricatorTypeaheadDatasourceController' => 'applications/typeahead/controller/base', @@ -417,6 +419,8 @@ phutil_register_library_map(array( 'PhabricatorPeopleEditController' => 'PhabricatorPeopleController', 'PhabricatorPeopleListController' => 'PhabricatorPeopleController', 'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController', + 'PhabricatorRemarkupRuleDifferential' => 'PhutilRemarkupRule', + 'PhabricatorRemarkupRuleManiphest' => 'PhutilRemarkupRule', 'PhabricatorStandardPageView' => 'AphrontPageView', 'PhabricatorTypeaheadCommonDatasourceController' => 'PhabricatorTypeaheadDatasourceController', 'PhabricatorTypeaheadDatasourceController' => 'PhabricatorController', diff --git a/src/aphront/console/plugin/config/__init__.php b/src/aphront/console/plugin/config/__init__.php index 5382f49a37..3d244d156e 100644 --- a/src/aphront/console/plugin/config/__init__.php +++ b/src/aphront/console/plugin/config/__init__.php @@ -7,6 +7,7 @@ phutil_require_module('phabricator', 'aphront/console/plugin/base'); +phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phabricator', 'view/control/table'); phutil_require_module('phutil', 'markup'); diff --git a/src/applications/differential/parser/markup/DifferentialMarkupEngineFactory.php b/src/applications/differential/parser/markup/DifferentialMarkupEngineFactory.php index b76043387d..ed65834c50 100644 --- a/src/applications/differential/parser/markup/DifferentialMarkupEngineFactory.php +++ b/src/applications/differential/parser/markup/DifferentialMarkupEngineFactory.php @@ -24,6 +24,10 @@ class DifferentialMarkupEngineFactory { $rules = array(); $rules[] = new PhutilRemarkupRuleEscapeRemarkup(); $rules[] = new PhutilRemarkupRuleHyperlink(); + + $rules[] = new PhabricatorRemarkupRuleDifferential(); + $rules[] = new PhabricatorRemarkupRuleManiphest(); + $rules[] = new PhutilRemarkupRuleEscapeHTML(); $rules[] = new PhutilRemarkupRuleMonospace(); $rules[] = new PhutilRemarkupRuleBold(); diff --git a/src/applications/differential/parser/markup/__init__.php b/src/applications/differential/parser/markup/__init__.php index bd26fa5ba7..6ee3f666db 100644 --- a/src/applications/differential/parser/markup/__init__.php +++ b/src/applications/differential/parser/markup/__init__.php @@ -6,6 +6,9 @@ +phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/differential'); +phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/maniphest'); + phutil_require_module('phutil', 'markup/engine/remarkup'); phutil_require_module('phutil', 'markup/engine/remarkup/blockrule/remarkupcode'); phutil_require_module('phutil', 'markup/engine/remarkup/blockrule/remarkupdefault'); diff --git a/src/infrastructure/markup/remarkup/markuprule/differential/PhabricatorRemarkupRuleDifferential.php b/src/infrastructure/markup/remarkup/markuprule/differential/PhabricatorRemarkupRuleDifferential.php new file mode 100644 index 0000000000..fe3399bf30 --- /dev/null +++ b/src/infrastructure/markup/remarkup/markuprule/differential/PhabricatorRemarkupRuleDifferential.php @@ -0,0 +1,37 @@ +getEngine()->storeText( + 'D'.$matches[1].''); + } + +} diff --git a/src/infrastructure/markup/remarkup/markuprule/differential/__init__.php b/src/infrastructure/markup/remarkup/markuprule/differential/__init__.php new file mode 100644 index 0000000000..236c22dc6c --- /dev/null +++ b/src/infrastructure/markup/remarkup/markuprule/differential/__init__.php @@ -0,0 +1,12 @@ +getEngine()->storeText( + 'T'.$matches[1].''); + } + +} diff --git a/src/infrastructure/markup/remarkup/markuprule/maniphest/__init__.php b/src/infrastructure/markup/remarkup/markuprule/maniphest/__init__.php new file mode 100644 index 0000000000..711a1e8a7f --- /dev/null +++ b/src/infrastructure/markup/remarkup/markuprule/maniphest/__init__.php @@ -0,0 +1,12 @@ +