- commit
- 586e47897dff05cfab53cb786cd8c4e839fde1f3
- parent
- 4c9e08ce7430f6f192e096001dfbcfd420b7748f
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-05-08 18:18
fix off-by-1 in diff
Diffstat
M | static/context.js | 2 | +- |
1 files changed, 1 insertions, 1 deletions
diff --git a/static/context.js b/static/context.js
@@ -73,7 +73,7 @@ export var diff = function(text1, text2, ctx) { 73 73 while (start < text1.length && start < text2.length && text1[start] === text2[start]) { 74 74 start += 1; 75 75 }76 -1 while (end1 >= start && end2 >= start && text1[end1 - 1] === text2[end2 - 1]) {-1 76 while (end1 > start && end2 > start && text1[end1 - 1] === text2[end2 - 1]) { 77 77 end1 -= 1; 78 78 end2 -= 1; 79 79 }