@@ -199,16 +199,20 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 | unless "".respond_to?(:force_encoding) | |||
202 | while line_left[starting].ord.between?(128, 191) && starting > 0 |
|
203 | while line_left[starting].ord.between?(128, 191) && starting > 0 | |
203 | starting -= 1 |
|
204 | starting -= 1 | |
204 | end |
|
205 | 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 | |
|
211 | unless "".respond_to?(:force_encoding) | |||
209 | while line_left[ending].ord.between?(128, 191) && ending > -1 |
|
212 | while line_left[ending].ord.between?(128, 191) && ending > -1 | |
210 | ending -= 1 |
|
213 | ending -= 1 | |
211 | end |
|
214 | end | |
|
215 | end | |||
212 | unless starting == 0 && ending == -1 |
|
216 | unless starting == 0 && ending == -1 | |
213 | [starting, ending] |
|
217 | [starting, ending] | |
214 | end |
|
218 | end |
General Comments 0
You need to be logged in to leave comments.
Login now