Kind-of-terrible (?) oncopy handler
Summary: Works in Safari, Firefox, Chrome. Test Plan: Copied some text, threw up a little in my mouth. Reviewers: aran, tuomaspelkonen, tomo, rstout, btrahan Reviewed By: aran CC: aran, epriestley, ddfisher Maniphest Tasks: T145, T995 Differential Revision: https://secure.phabricator.com/D244
This commit is contained in:
@@ -142,6 +142,7 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||
|
||||
$text_list = explode("\n", $source);
|
||||
|
||||
Javelin::initBehavior('phabricator-oncopy', array());
|
||||
$rows = $this->buildDisplayRows($text_list);
|
||||
|
||||
$corpus_table = phutil_render_tag(
|
||||
@@ -179,7 +180,10 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||
),
|
||||
$n);
|
||||
$rows[] = '<tr id="'.$anchor.'"><th>'.$link.'</th>'.
|
||||
'<td style="white-space: pre-wrap;">'.$line.'</td></tr>';
|
||||
'<td style="white-space: pre-wrap;">'.
|
||||
// NOTE: See the 'phabricator-oncopy' behavior.
|
||||
"\xE2\x80\x8B".
|
||||
$line.'</td></tr>';
|
||||
++$n;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user