<% Redmine::UnifiedDiff.new(diff, diff_type).each do |table_file| -%>
<% if diff_type == 'sbs' -%> <% prev_line_left, prev_line_right = nil, nil -%> <% table_file.keys.sort.each do |key| -%> <% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%> <% end -%> <% prev_line_left, prev_line_right = table_file[key].nb_line_left.to_i, table_file[key].nb_line_right.to_i -%> <% end -%>
<%= table_file.file_name %>
......
<%= table_file[key].nb_line_left %>
<%=to_utf8 table_file[key].line_left %>
<%= table_file[key].nb_line_right %>
<%=to_utf8 table_file[key].line_right %>
<% else -%> <% prev_line_left, prev_line_right = nil, nil -%> <% table_file.keys.sort.each do |key, line| %> <% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%> <% end -%> <% if table_file[key].line_left.empty? -%> <% else -%> <% end -%> <% prev_line_left = table_file[key].nb_line_left.to_i if table_file[key].nb_line_left.to_i > 0 -%> <% prev_line_right = table_file[key].nb_line_right.to_i if table_file[key].nb_line_right.to_i > 0 -%> <% end -%>
<%= table_file.file_name %>
......
<%= table_file[key].nb_line_left %> <%= table_file[key].nb_line_right %>
<%=to_utf8 table_file[key].line_right %>
<%=to_utf8 table_file[key].line_left %>
<% end -%>
<% end -%>