diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-04-22 15:18:25 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-04-22 15:18:25 +0200 |
commit | 98d4b05fa8a94ce184b3aa7f52d823458ad2edfd (patch) | |
tree | cd1f70112bcddb5cf2a41ea7146b7f08e18ee82b | |
parent | 44f26ca2ca5be7c34c323adb247d7c5404faf82c (diff) |
Fix: previous commit
Oops.
-rw-r--r-- | monkey/__init__.py | 6 |
1 files 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) |