From 46a07b1e488890f6410b4964fe8fd911afc11abd Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 31 Oct 2021 16:34:51 +0100 Subject: [PATCH] Fix todo block detection --- open-todo-txt.py | 3 +++ 1 file changed, 3 insertions(+) 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: