1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 14:30:56 +01:00

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
This commit is contained in:
epriestley 2014-07-05 10:16:58 -07:00
parent a7c1f872a0
commit 0cc32a9b8f

View file

@ -7,6 +7,14 @@ final class ProjectRemarkupRule
return '#'; return '#';
} }
protected function renderObjectRef($object, $handle, $anchor, $id) {
if ($this->getEngine()->isTextMode()) {
return '#'.$id;
}
return $handle->renderTag();
}
protected function getObjectIDPattern() { protected function getObjectIDPattern() {
// NOTE: This explicitly does not match strings which contain only // NOTE: This explicitly does not match strings which contain only
// digits, because digit strings like "#123" are used to reference tasks at // digits, because digit strings like "#123" are used to reference tasks at