diff options
author | Robert Speicher <robert@gitlab.com> | 2016-01-22 07:37:47 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-01-22 07:37:47 +0000 |
commit | 2fed8bf390aa89a854ac5452aa934076cd426a81 (patch) | |
tree | bca5a3fe0d321424fe6755ab8441485594ef1c7d /app/views | |
parent | 87867018f3157c617e489c5edbd127055571b11f (diff) | |
parent | 3db24ec9e80369834ccf7d2423808fcf5e51b5a6 (diff) | |
download | gitlab-ce-2fed8bf390aa89a854ac5452aa934076cd426a81.tar.gz |
Merge branch 'fix-diff-comments' into 'master'
More highlighted diff fixes
See merge request !2545
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/diffs/_text_file.html.haml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml index d9f2dce1389..5e835b10e1f 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: "", |