diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-02-10 01:18:48 +0100 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-08-11 14:26:02 +0200 |
commit | e337060dad246b8fc5841c658cfbf86e22307b4e (patch) | |
tree | bab82245d10365db72943cccfcecc3b7a7949e7b /monkey | |
parent | e293546eabf2cac650b764c16a04fd737db7bdac (diff) |
Improve codemirror markers
Diffstat (limited to 'monkey')
-rwxr-xr-x | monkey/monkey.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/monkey/monkey.py b/monkey/monkey.py index 7155c23..c037193 100755 --- a/monkey/monkey.py +++ b/monkey/monkey.py @@ -181,9 +181,17 @@ def fix_ranges(edits): marks = [] for step_type, line, (before, after) in edits: if step_type == 'change_line': - marks.append(('change', (before[0].pos, before[-1].pos+len(before[-1].val)))) + marks.append({ 'start': before[0].pos, + 'end': before[-1].pos+len(before[-1].val), + 'msg': 'Change this line.' }) elif step_type == 'remove_line': - marks.append(('remove', (before[0].pos, before[-1].pos+len(before[-1].val)))) - elif step_type == 'add_subgoal' or step_type == 'add_rule': - marks.append((step_type, line)) + marks.append({ 'start': before[0].pos, + 'end': before[-1].pos+len(before[-1].val), + 'msg': 'Remove this line.' }) + elif step_type == 'add_subgoal': + marks.append({ 'msg': 'Add a new subgoal', + 'line': line }); + elif step_type == 'add_rule': + marks.append({ 'msg': 'Add a new rule', + 'line': line }); return marks |