fix merge request diff
This commit is contained in:
parent
570f63daaf
commit
c2cfc52e44
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
- @diffs.each do |diff|
|
- @diffs.each_with_index do |diff, i|
|
||||||
- next if diff.diff.empty?
|
- next if diff.diff.empty?
|
||||||
- file = (@commit.tree / diff.b_path)
|
- file = (@commit.tree / diff.b_path)
|
||||||
- next unless file
|
- next unless file
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
%br/
|
%br/
|
||||||
.diff_file_content
|
.diff_file_content
|
||||||
- if file.text?
|
- if file.text?
|
||||||
= render :partial => "commits/text_file", :locals => { :diff => diff }
|
= render :partial => "commits/text_file", :locals => { :diff => diff, :index => i }
|
||||||
- elsif file.image?
|
- elsif file.image?
|
||||||
.diff_file_content_image
|
.diff_file_content_image
|
||||||
%img{:src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
|
%img{:src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
|
||||||
|
|
Loading…
Reference in a new issue