mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Restore linking of Diffusion commits.
This commit is contained in:
parent
63748f6e05
commit
a2a6509dc8
5 changed files with 53 additions and 0 deletions
|
@ -353,6 +353,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorProjectProfileController' => 'applications/project/controller/profile',
|
'PhabricatorProjectProfileController' => 'applications/project/controller/profile',
|
||||||
'PhabricatorRedirectController' => 'applications/base/controller/redirect',
|
'PhabricatorRedirectController' => 'applications/base/controller/redirect',
|
||||||
'PhabricatorRemarkupRuleDifferential' => 'infrastructure/markup/remarkup/markuprule/differential',
|
'PhabricatorRemarkupRuleDifferential' => 'infrastructure/markup/remarkup/markuprule/differential',
|
||||||
|
'PhabricatorRemarkupRuleDiffusion' => 'infrastructure/markup/remarkup/markuprule/diffusion',
|
||||||
'PhabricatorRemarkupRuleManiphest' => 'infrastructure/markup/remarkup/markuprule/maniphest',
|
'PhabricatorRemarkupRuleManiphest' => 'infrastructure/markup/remarkup/markuprule/maniphest',
|
||||||
'PhabricatorRepository' => 'applications/repository/storage/repository',
|
'PhabricatorRepository' => 'applications/repository/storage/repository',
|
||||||
'PhabricatorRepositoryArcanistProject' => 'applications/repository/storage/arcanistproject',
|
'PhabricatorRepositoryArcanistProject' => 'applications/repository/storage/arcanistproject',
|
||||||
|
@ -728,6 +729,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorProjectProfileController' => 'PhabricatorProjectController',
|
'PhabricatorProjectProfileController' => 'PhabricatorProjectController',
|
||||||
'PhabricatorRedirectController' => 'PhabricatorController',
|
'PhabricatorRedirectController' => 'PhabricatorController',
|
||||||
'PhabricatorRemarkupRuleDifferential' => 'PhutilRemarkupRule',
|
'PhabricatorRemarkupRuleDifferential' => 'PhutilRemarkupRule',
|
||||||
|
'PhabricatorRemarkupRuleDiffusion' => 'PhutilRemarkupRule',
|
||||||
'PhabricatorRemarkupRuleManiphest' => 'PhutilRemarkupRule',
|
'PhabricatorRemarkupRuleManiphest' => 'PhutilRemarkupRule',
|
||||||
'PhabricatorRepository' => 'PhabricatorRepositoryDAO',
|
'PhabricatorRepository' => 'PhabricatorRepositoryDAO',
|
||||||
'PhabricatorRepositoryArcanistProject' => 'PhabricatorRepositoryDAO',
|
'PhabricatorRepositoryArcanistProject' => 'PhabricatorRepositoryDAO',
|
||||||
|
|
|
@ -28,6 +28,7 @@ class DifferentialMarkupEngineFactory {
|
||||||
$rules[] = new PhutilRemarkupRuleHyperlink();
|
$rules[] = new PhutilRemarkupRuleHyperlink();
|
||||||
|
|
||||||
$rules[] = new PhabricatorRemarkupRuleDifferential();
|
$rules[] = new PhabricatorRemarkupRuleDifferential();
|
||||||
|
$rules[] = new PhabricatorRemarkupRuleDiffusion();
|
||||||
$rules[] = new PhabricatorRemarkupRuleManiphest();
|
$rules[] = new PhabricatorRemarkupRuleManiphest();
|
||||||
|
|
||||||
$rules[] = new PhutilRemarkupRuleEscapeHTML();
|
$rules[] = new PhutilRemarkupRuleEscapeHTML();
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
|
|
||||||
phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/differential');
|
phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/differential');
|
||||||
|
phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/diffusion');
|
||||||
phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/maniphest');
|
phutil_require_module('phabricator', 'infrastructure/markup/remarkup/markuprule/maniphest');
|
||||||
|
|
||||||
phutil_require_module('phutil', 'markup/engine/remarkup');
|
phutil_require_module('phutil', 'markup/engine/remarkup');
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 2011 Facebook, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group markup
|
||||||
|
*/
|
||||||
|
class PhabricatorRemarkupRuleDiffusion
|
||||||
|
extends PhutilRemarkupRule {
|
||||||
|
|
||||||
|
public function apply($text) {
|
||||||
|
return preg_replace_callback(
|
||||||
|
'@\br([A-Z]+[a-z0-9]+)\b@',
|
||||||
|
array($this, 'markupDiffusionLink'),
|
||||||
|
$text);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function markupDiffusionLink($matches) {
|
||||||
|
return $this->getEngine()->storeText(
|
||||||
|
'<a href="/r'.$matches[1].'">r'.$matches[1].'</a>');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is automatically generated. Lint this module to rebuild it.
|
||||||
|
* @generated
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
phutil_require_module('phutil', 'markup/engine/remarkup/markuprule/base');
|
||||||
|
|
||||||
|
|
||||||
|
phutil_require_source('PhabricatorRemarkupRuleDiffusion.php');
|
Loading…
Reference in a new issue