From a09b298d85d70a6e6c398094a8dc8b7a5a1bfc85 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 25 Sep 2019 12:40:40 -0700 Subject: [PATCH] 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 --- .../render/DifferentialChangesetTwoUpRenderer.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php b/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php index 63961c7983..d0926c6d8a 100644 --- a/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php +++ b/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php @@ -420,19 +420,17 @@ final class DifferentialChangesetTwoUpRenderer if ($old_content === null) { $old_id = null; - $old_label = null; } else { $old_id = "C{$old_changeset_key}OL{$old_key}"; - $old_label = $old_key; } $old_line_cell = phutil_tag( 'td', array( 'id' => $old_id, + 'data-n' => $old_key, 'class' => 'n', - ), - $old_label); + )); $old_content_cell = phutil_tag( 'td', @@ -443,19 +441,17 @@ final class DifferentialChangesetTwoUpRenderer if ($new_content === null) { $new_id = null; - $new_label = null; } else { $new_id = "C{$new_changeset_key}NL{$new_key}"; - $new_label = $new_key; } $new_line_cell = phutil_tag( 'td', array( 'id' => $new_id, + 'data-n' => $new_key, 'class' => 'n', - ), - $new_label); + )); $new_content_cell = phutil_tag( 'td',