Fix parsing regex and stringifier for Todos

This commit is contained in:
2025-11-30 22:05:03 -05:00
parent 270ec59fbe
commit 597cf6fbb4
2 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
import re import re
from todo import Todo from .todo import Todo
TODO_PATTERN = r"^- \[( |X)\] (.+)$" TODO_PATTERN = r"^- \[( |X)\] (.+)$"

View File

@@ -8,4 +8,5 @@ class Todo:
self.lid = gen_random_base64(10) self.lid = gen_random_base64(10)
def __str__(self): def __str__(self):
return f"- [{self.checked}] {self.item}" checkmark = "X" if self.checked else " "
return f"- [{checkmark}] {self.item}"