@@ -199,15 +199,19 module Redmine | |||||
199 | while starting < max && line_left[starting] == line_right[starting] |
|
199 | while starting < max && line_left[starting] == line_right[starting] | |
200 | starting += 1 |
|
200 | starting += 1 | |
201 | end |
|
201 | end | |
202 | while line_left[starting].ord.between?(128, 191) && starting > 0 |
|
202 | unless "".respond_to?(:force_encoding) | |
203 | starting -= 1 |
|
203 | while line_left[starting].ord.between?(128, 191) && starting > 0 | |
|
204 | starting -= 1 | |||
|
205 | end | |||
204 | end |
|
206 | end | |
205 | ending = -1 |
|
207 | ending = -1 | |
206 | while ending >= -(max - starting) && line_left[ending] == line_right[ending] |
|
208 | while ending >= -(max - starting) && line_left[ending] == line_right[ending] | |
207 | ending -= 1 |
|
209 | ending -= 1 | |
208 | end |
|
210 | end | |
209 | while line_left[ending].ord.between?(128, 191) && ending > -1 |
|
211 | unless "".respond_to?(:force_encoding) | |
210 | ending -= 1 |
|
212 | while line_left[ending].ord.between?(128, 191) && ending > -1 | |
|
213 | ending -= 1 | |||
|
214 | end | |||
211 | end |
|
215 | end | |
212 | unless starting == 0 && ending == -1 |
|
216 | unless starting == 0 && ending == -1 | |
213 | [starting, ending] |
|
217 | [starting, ending] |
General Comments 0
You need to be logged in to leave comments.
Login now