Fix todo block detection

This commit is contained in:
Marty Oehme 2021-10-31 16:34:51 +01:00
parent 12c1f68343
commit 46a07b1e48
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -37,10 +37,13 @@ def parse_file(options):
todo_block = get_todo_block_date(line, options.todo_block_title) todo_block = get_todo_block_date(line, options.todo_block_title)
if todo_block == False: if todo_block == False:
curdate = ""
continue continue
if todo_block != "same": if todo_block != "same":
curdate = todo_block curdate = todo_block
continue continue
if not curdate:
continue
completed_task = re.search(r"^x ((?:\([A-D]\))? ?.*)$", line) completed_task = re.search(r"^x ((?:\([A-D]\))? ?.*)$", line)
if completed_task and options.taskwarrior_log_done: if completed_task and options.taskwarrior_log_done: