ivan-lednev / obsidian-task-archiver

Archive completed tasks in your Obsidian vault (plus other org-mode-like features)
MIT License
116 stars 12 forks source link

Adding metadata to a task breaks block references #79

Open whatisaphone opened 9 months ago

whatisaphone commented 9 months ago

Adding metadata to a task breaks block references. To fix, the block ID should remain at the end of the line, after the added metadata.

Repro

tasks.md:

- [ ] report bug ^a95049

journal.md:

today i did [[tasks#^a95049]]

At this point (1) Obsidian renders the block id in smaller text, and (2) if you click on the link, Obsidian will select the task. These behaviors indicate that the block ref is valid.

Now run the command "Toggle task done and archive it".

Actual result:

# Archived

- [x] report bug ^a95049 πŸ”’ [[2024-01-30]] πŸ•ΈοΈ tasks

In journal.md, the link is now broken.

Expected result:

# Archived

- [x] report bug πŸ”’ [[2024-01-30]] πŸ•ΈοΈ tasks ^a95049

The block ID should remain at the end of the line.