From 8482569a47a98c05ad33eefd0705e13766155355 Mon Sep 17 00:00:00 2001 From: vrana Date: Tue, 7 Feb 2012 18:55:33 -0800 Subject: [PATCH] Add line link to Paste Summary: Better something than nothing. Test Plan: View paste, click on line number. Reviewers: codeblock, epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1596 --- .../controller/view/PhabricatorPasteViewController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/applications/paste/controller/view/PhabricatorPasteViewController.php b/src/applications/paste/controller/view/PhabricatorPasteViewController.php index 69ca9701ec..3ae8afbc6e 100644 --- a/src/applications/paste/controller/view/PhabricatorPasteViewController.php +++ b/src/applications/paste/controller/view/PhabricatorPasteViewController.php @@ -170,7 +170,15 @@ class PhabricatorPasteViewController extends PhabricatorPasteController { // And eventually this will highlight a line that you click // like diffusion does. Or maybe allow for line comments // like differential. Either way it will be better than it is now. - $rows[] = ''.$n.''. + $anchor = 'L'.$n; + $link = phutil_render_tag( + 'a', + array( + 'name' => $anchor, + 'href' => '#'.$anchor, + ), + $n); + $rows[] = ''.$link.''. ''.$line.''; ++$n; }