From 98d4b05fa8a94ce184b3aa7f52d823458ad2edfd Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 22 Apr 2016 15:18:25 +0200 Subject: Fix: previous commit Oops. --- monkey/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/__init__.py b/monkey/__init__.py index d853ab2..5408061 100644 --- a/monkey/__init__.py +++ b/monkey/__init__.py @@ -110,9 +110,9 @@ def min_diff(a, b): if startswith(b, a): return [('insert', len(a), len(a), len(a), len(b))] if endswith(a, b): - return [('remove', 0, len(a)-len(b), 0, 0)] + return [('delete', 0, len(a)-len(b), 0, 0)] if startswith(a, b): - return [('remove', len(b), len(a), len(b), len(b))] + return [('delete', len(b), len(a), len(b), len(b))] return difflib.SequenceMatcher(a=a, b=b, autojunk=False).get_opcodes() # Return a list of hint objects for the web app. @@ -130,7 +130,7 @@ def fix_hints(code, steps): else: pos_start = tokens[idx+i1].pos pos_end = pos_start+1 - elif tag == 'remove': + elif tag == 'delete': hint_id = 'monkey_remove' pos_start = tokens[idx+i1].pos pos_end = tokens[idx+i2-1].pos + len(tokens[idx+i2-1].val) -- cgit v1.2.1