1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 10:12:41 +01:00

Correct DOM node metadata to let inline comments work against block-based diffs

Summary: Depends on D20833. Ref T13425. This look like it "just works"?

Test Plan: Left inline comments on a Juptyer notebook. Nothing seemed broken? Confusing.

Maniphest Tasks: T13425

Differential Revision: https://secure.phabricator.com/D20834
This commit is contained in:
epriestley 2019-09-25 12:40:40 -07:00
parent 1c4450d39f
commit a09b298d85

View file

@ -420,19 +420,17 @@ final class DifferentialChangesetTwoUpRenderer
if ($old_content === null) { if ($old_content === null) {
$old_id = null; $old_id = null;
$old_label = null;
} else { } else {
$old_id = "C{$old_changeset_key}OL{$old_key}"; $old_id = "C{$old_changeset_key}OL{$old_key}";
$old_label = $old_key;
} }
$old_line_cell = phutil_tag( $old_line_cell = phutil_tag(
'td', 'td',
array( array(
'id' => $old_id, 'id' => $old_id,
'data-n' => $old_key,
'class' => 'n', 'class' => 'n',
), ));
$old_label);
$old_content_cell = phutil_tag( $old_content_cell = phutil_tag(
'td', 'td',
@ -443,19 +441,17 @@ final class DifferentialChangesetTwoUpRenderer
if ($new_content === null) { if ($new_content === null) {
$new_id = null; $new_id = null;
$new_label = null;
} else { } else {
$new_id = "C{$new_changeset_key}NL{$new_key}"; $new_id = "C{$new_changeset_key}NL{$new_key}";
$new_label = $new_key;
} }
$new_line_cell = phutil_tag( $new_line_cell = phutil_tag(
'td', 'td',
array( array(
'id' => $new_id, 'id' => $new_id,
'data-n' => $new_key,
'class' => 'n', 'class' => 'n',
), ));
$new_label);
$new_content_cell = phutil_tag( $new_content_cell = phutil_tag(
'td', 'td',