summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-04-22 15:18:25 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-04-22 15:18:25 +0200
commit98d4b05fa8a94ce184b3aa7f52d823458ad2edfd (patch)
treecd1f70112bcddb5cf2a41ea7146b7f08e18ee82b
parent44f26ca2ca5be7c34c323adb247d7c5404faf82c (diff)
Fix: previous commit
Oops.
-rw-r--r--monkey/__init__.py6
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)