From 0cc32a9b8f27d88be4cc6118c3949c66f6ed5407 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 5 Jul 2014 10:16:58 -0700 Subject: [PATCH] Render hashtags as colored/icon'd project tags Summary: In most cases we preserve what the user typed, but showing colors/icons/names is more useful than `#yolo` (and makes aliases more usable without loss of meaning). Test Plan: {F174510} Reviewers: chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D9831 --- src/applications/project/remarkup/ProjectRemarkupRule.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/applications/project/remarkup/ProjectRemarkupRule.php b/src/applications/project/remarkup/ProjectRemarkupRule.php index a34591cf49..883751df84 100644 --- a/src/applications/project/remarkup/ProjectRemarkupRule.php +++ b/src/applications/project/remarkup/ProjectRemarkupRule.php @@ -7,6 +7,14 @@ final class ProjectRemarkupRule return '#'; } + protected function renderObjectRef($object, $handle, $anchor, $id) { + if ($this->getEngine()->isTextMode()) { + return '#'.$id; + } + + return $handle->renderTag(); + } + protected function getObjectIDPattern() { // NOTE: This explicitly does not match strings which contain only // digits, because digit strings like "#123" are used to reference tasks at