When the current line is a todo, also use it for the next
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter Stuifzand 2020-10-26 23:30:11 +01:00
parent 955f60abe8
commit 891390d98e

View File

@ -431,6 +431,9 @@ function editor(root, inputData, options) {
let next = cursor.get() + 1 < store.length() ? store.value(store.currentID(cursor.get() + 1)).indented : current let next = cursor.get() + 1 < store.length() ? store.value(store.currentID(cursor.get() + 1)).indented : current
let indent = next > current ? next : current let indent = next > current ? next : current
let item = newListItem(indent) let item = newListItem(indent)
if (currentValue.text.match(/^#\[\[TODO\]\]/)) {
item.text = '#[[TODO]] ';
}
cursor.insertBelow(store, item) cursor.insertBelow(store, item)
} }