Task with subtasks is not created correctly in MD #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When you create a task with subtasks in SP the sync create just a list of tasks (tasks and subtasks) not indenting the subtasks.
Fixed in v0.1.2 (commit
3eefaf7).Root cause: in
mergeSpIntoExistingFile(SP→MD write-back), a subtask added in SP under a parent that was already present in the file arrived "alone" in the append step (the parent isn't new), soconvertTasksToMarkdownrendered it as a flat, unindented orphan at the end of the file. Generating a brand-new file worked, which is why the existing unit tests passed — the in-place merge had no subtask coverage.Fix:
subTaskIds.detectIndentString— the original attempt measured indent by character length and re-emitted spaces, which collapsed a tab to a single space.Verified on macOS 18.9.1D: adding a subtask in SP under an existing parent now writes it indented with a tab, matching the file's existing subtasks.
Closing as fixed.