Commit 1b6a018b authored by Bram Schoenmakers's avatar Bram Schoenmakers

Let TodoListBase.number return the textual ID if text IDs are enabled.

parent 9bafa56c
......@@ -225,8 +225,11 @@ class TodoListBase(object):
def number(self, p_todo):
try:
return self._todos.index(p_todo) + 1
except ValueError:
if config().identifiers() == 'text':
return self._todo_id_map[p_todo]
else:
return self._todos.index(p_todo) + 1
except (ValueError, KeyError):
raise InvalidTodoException
def pp_number(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment