diff --git a/home/bin/executable_todo_archive b/home/bin/executable_todo_archive index fdc2838..f052a58 100644 --- a/home/bin/executable_todo_archive +++ b/home/bin/executable_todo_archive @@ -22,7 +22,13 @@ from stage_left.types import State, Group, Item def format_item(item: Item) -> str: """Format an item back to [x]it! syntax.""" - return f"[{item.state.value}] {item.description}" + lines = item.description.split('\n') + first_line = f"[{item.state.value}] {lines[0]}" + if len(lines) == 1: + return first_line + # Indent continuation lines (4 spaces to align with content after "[x] ") + continuation_lines = [' ' + line for line in lines[1:]] + return '\n'.join([first_line] + continuation_lines) def sort_groups(groups: list[Group]) -> list[Group]: @@ -59,7 +65,7 @@ def extract_archivable_items(groups: list[Group]) -> tuple[list[Group], list[Gro (archivable_groups, remaining_groups) - Both preserve group structure. Empty groups are preserved in remaining_groups. """ - archivable_states = {State.CHECKED, State.OBSOLETE} + archivable_states = {State.CHECKED, State.OBSOLETE, State.IN_QUESTION} archivable_groups = [] remaining_groups = []