1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +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:
epriestley 2013-01-21 11:57:58 -08:00
parent d5b006b2cc
commit 08e61c6ff1
2 changed files with 14 additions and 9 deletions

View file

@ -41,7 +41,7 @@ final class PhabricatorMarkupEngine {
private $objects = array();
private $viewer;
private $version = 1;
private $version = 2;
/* -( Markup Pipeline )---------------------------------------------------- */

View file

@ -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(
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)));
phutil_escape_html($name));
}
return $this->getEngine()->storeText($text);
}
}