Skip to content

Commit

Permalink
Merge branch 'diff_bug'
Browse files Browse the repository at this point in the history
  • Loading branch information
vsizov committed Oct 4, 2012
2 parents d883327 + bd5334a commit 810d090
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/gitlab/inline_diff.rb
Expand Up @@ -21,14 +21,13 @@ def processing diff_arr
end
end
first_token = first_line[0..first_the_same_symbols][1..-1]

diff_arr[index+1].sub!(first_token, first_token + START)
diff_arr[index+2].sub!(first_token, first_token + START)

last_the_same_symbols = 0
(1..max_length + 1).each do |i|
last_the_same_symbols = -i
if first_line[-i] != second_line[-i]
shortest_line = second_line.size > first_line.size ? first_line : second_line
if ( first_line[-i] != second_line[-i] ) || "#{first_token}#{START}".size == shortest_line[1..-i].size
break
end
end
Expand Down

0 comments on commit 810d090

Please sign in to comment.