Show More
@@ -19,6 +19,7 b' def splitnewlines(text):' | |||||
19 |
|
19 | |||
20 | def _normalizeblocks(a, b, blocks): |
|
20 | def _normalizeblocks(a, b, blocks): | |
21 | prev = None |
|
21 | prev = None | |
|
22 | r = [] | |||
22 | for curr in blocks: |
|
23 | for curr in blocks: | |
23 | if prev is None: |
|
24 | if prev is None: | |
24 | prev = curr |
|
25 | prev = curr | |
@@ -40,9 +41,10 b' def _normalizeblocks(a, b, blocks):' | |||||
40 | while (b1end + shift < b2end and |
|
41 | while (b1end + shift < b2end and | |
41 | a[a1end + shift] == b[b1end + shift]): |
|
42 | a[a1end + shift] == b[b1end + shift]): | |
42 | shift += 1 |
|
43 | shift += 1 | |
43 |
|
|
44 | r.append((a1, b1, l1 + shift)) | |
44 | prev = a2 + shift, b2 + shift, l2 - shift |
|
45 | prev = a2 + shift, b2 + shift, l2 - shift | |
45 |
|
|
46 | r.append(prev) | |
|
47 | return r | |||
46 |
|
48 | |||
47 | def bdiff(a, b): |
|
49 | def bdiff(a, b): | |
48 | a = str(a).splitlines(True) |
|
50 | a = str(a).splitlines(True) |
General Comments 0
You need to be logged in to leave comments.
Login now