mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Phabricator changes for TOC markup
Summary: See T2333 / D4565. Fixes the Phriction rule. Test Plan: See D4565. Reviewers: btrahan, vrana Reviewed By: btrahan CC: aran Maniphest Tasks: T2333 Differential Revision: https://secure.phabricator.com/D4566
This commit is contained in:
parent
d5b006b2cc
commit
08e61c6ff1
2 changed files with 14 additions and 9 deletions
|
@ -41,7 +41,7 @@ final class PhabricatorMarkupEngine {
|
|||
|
||||
private $objects = array();
|
||||
private $viewer;
|
||||
private $version = 1;
|
||||
private $version = 2;
|
||||
|
||||
|
||||
/* -( Markup Pipeline )---------------------------------------------------- */
|
||||
|
|
|
@ -27,14 +27,19 @@ final class PhabricatorRemarkupRulePhriction
|
|||
$slug = PhrictionDocument::getSlugURI($slug);
|
||||
$href = (string) id(new PhutilURI($slug))->setFragment($fragment);
|
||||
|
||||
return $this->getEngine()->storeText(
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
'class' => 'phriction-link',
|
||||
),
|
||||
phutil_escape_html($name)));
|
||||
if ($this->getEngine()->getState('toc')) {
|
||||
$text = phutil_escape_html($name);
|
||||
} else {
|
||||
$text = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
'class' => 'phriction-link',
|
||||
),
|
||||
phutil_escape_html($name));
|
||||
}
|
||||
|
||||
return $this->getEngine()->storeText($text);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue