1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

Display #1 instead of #comment-1 in comment anchors

Summary: I changed this a long time ago probably without knowing that this format is usable in Remarkup.

Test Plan: Viewed revision and task.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4413
This commit is contained in:
vrana 2013-01-11 15:46:41 -08:00
parent ad23821107
commit b0edca7294
2 changed files with 7 additions and 4 deletions

View file

@ -180,10 +180,11 @@ final class DifferentialRevisionCommentView extends AphrontView {
} else {
$xaction_view->setEpoch($comment->getDateCreated());
if ($this->anchorName) {
$anchor_name = $this->anchorName;
$anchor_text = 'D'.$comment->getRevisionID().'#'.$anchor_name;
$anchor_text =
'D'.$comment->getRevisionID().
'#'.preg_replace('/^comment-/', '', $this->anchorName);
$xaction_view->setAnchor($anchor_name, $anchor_text);
$xaction_view->setAnchor($this->anchorName, $anchor_text);
}
}

View file

@ -206,7 +206,9 @@ final class ManiphestTransactionDetailView extends ManiphestView {
$xaction_view->setEpoch($any_transaction->getDateCreated());
if ($this->commentNumber) {
$anchor_name = 'comment-'.$this->commentNumber;
$anchor_text = 'T'.$any_transaction->getTaskID().'#'.$anchor_name;
$anchor_text =
'T'.$any_transaction->getTaskID().
'#'.$this->commentNumber;
$xaction_view->setAnchor($anchor_name, $anchor_text);
}