1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

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
This commit is contained in:
vrana 2012-02-07 18:55:33 -08:00
parent a1c20638fa
commit 8482569a47

View file

@ -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[] = '<tr><th>'.$n.'</th>'.
$anchor = 'L'.$n;
$link = phutil_render_tag(
'a',
array(
'name' => $anchor,
'href' => '#'.$anchor,
),
$n);
$rows[] = '<tr id="'.$anchor.'"><th>'.$link.'</th>'.
'<td style="white-space: pre-wrap;">'.$line.'</td></tr>';
++$n;
}