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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user