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:
		| @@ -180,10 +180,11 @@ final class DifferentialRevisionCommentView extends AphrontView { | |||||||
|     } else { |     } else { | ||||||
|       $xaction_view->setEpoch($comment->getDateCreated()); |       $xaction_view->setEpoch($comment->getDateCreated()); | ||||||
|       if ($this->anchorName) { |       if ($this->anchorName) { | ||||||
|         $anchor_name = $this->anchorName; |         $anchor_text = | ||||||
|         $anchor_text = 'D'.$comment->getRevisionID().'#'.$anchor_name; |           'D'.$comment->getRevisionID(). | ||||||
|  |           '#'.preg_replace('/^comment-/', '', $this->anchorName); | ||||||
|  |  | ||||||
|         $xaction_view->setAnchor($anchor_name, $anchor_text); |         $xaction_view->setAnchor($this->anchorName, $anchor_text); | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -206,7 +206,9 @@ final class ManiphestTransactionDetailView extends ManiphestView { | |||||||
|       $xaction_view->setEpoch($any_transaction->getDateCreated()); |       $xaction_view->setEpoch($any_transaction->getDateCreated()); | ||||||
|       if ($this->commentNumber) { |       if ($this->commentNumber) { | ||||||
|         $anchor_name = 'comment-'.$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); |         $xaction_view->setAnchor($anchor_name, $anchor_text); | ||||||
|       } |       } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 vrana
					vrana