From 16d17b78cabe2efd762a4aa0e9fa2c2792fab32d Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 22 Jan 2016 02:10:58 +0100 Subject: Restore diff comments --- app/views/projects/diffs/_text_file.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml index f4fc6caba0f..2e329a823a6 100644 --- a/app/views/projects/diffs/_text_file.html.haml +++ b/app/views/projects/diffs/_text_file.html.haml @@ -6,6 +6,7 @@ %table.text-file.code.js-syntax-highlight{ class: too_big ? 'hide' : '' } - last_line = 0 + - raw_diff_lines = diff_file.diff_lines - diff_file.highlighted_diff_lines.each_with_index do |line, index| - type = line.type - last_line = line.new_pos @@ -31,7 +32,7 @@ - if @reply_allowed - comments = @line_notes.select { |n| n.line_code == line_code && n.active? }.sort_by(&:created_at) - unless comments.empty? - = render "projects/notes/diff_notes_with_reply", notes: comments, line: line.text + = render "projects/notes/diff_notes_with_reply", notes: comments, line: raw_diff_lines[index].text - if last_line > 0 = render "projects/diffs/match_line", {line: "", -- cgit v1.2.1