mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
fix that diff outputs become ??? in some non ASCII words (#12641)
Contributed by Filou Centrinov. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11549 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -199,10 +199,16 @@ module Redmine
|
||||
while starting < max && line_left[starting] == line_right[starting]
|
||||
starting += 1
|
||||
end
|
||||
while line_left[starting].ord.between?(128, 191) && starting > 0
|
||||
starting -= 1
|
||||
end
|
||||
ending = -1
|
||||
while ending >= -(max - starting) && line_left[ending] == line_right[ending]
|
||||
ending -= 1
|
||||
end
|
||||
while line_left[ending].ord.between?(128, 191) && ending > -1
|
||||
ending -= 1
|
||||
end
|
||||
unless starting == 0 && ending == -1
|
||||
[starting, ending]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user