shouldUseMarkupCache($field)) { $id = $this->getID(); } else { $id = PhabricatorHash::digest($this->getMarkupText($field)); } return "phriction:{$field}:{$id}"; } /** * @task markup */ public function getMarkupText($field) { return $this->getContent(); } /** * @task markup */ public function newMarkupEngine($field) { return PhabricatorMarkupEngine::newPhrictionMarkupEngine(); } /** * @task markup */ public function didMarkupText( $field, $output, PhutilMarkupEngine $engine) { $toc = PhutilRemarkupEngineRemarkupHeaderBlockRule::renderTableOfContents( $engine); if ($toc) { $toc = hsprintf( '
'. '
%s
'. '%s'. '
', pht('Table of Contents'), $toc); } return hsprintf( '
%s%s
', $toc, $output); } /** * @task markup */ public function shouldUseMarkupCache($field) { return (bool)$this->getID(); } }