mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +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:
parent
a1c20638fa
commit
8482569a47
1 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue