diff --git a/open-todo-txt.py b/open-todo-txt.py index 2a9d629..aeb951b 100755 --- a/open-todo-txt.py +++ b/open-todo-txt.py @@ -37,10 +37,13 @@ def parse_file(options): todo_block = get_todo_block_date(line, options.todo_block_title) if todo_block == False: + curdate = "" continue if todo_block != "same": curdate = todo_block continue + if not curdate: + continue completed_task = re.search(r"^x ((?:\([A-D]\))? ?.*)$", line) if completed_task and options.taskwarrior_log_done: