jacobtread / obsidian-timekeep

Obsidian task time tracking
MIT License
28 stars 0 forks source link

Bug: Timekeep Tracker Doesn't Work Inside Callouts #17

Closed julroger2013 closed 1 month ago

julroger2013 commented 1 month ago

If you try placing a Timekeep tracker inside a callout, the codeblock initially renders properly. However, as soon as you press the start button to begin tracking time, there's an error and the tracker cannot initiate.

I use the timers to keep track of billable time for multiple clients. I would love to be able to put multiple trackers inside of collapsible callouts all on one page, so that I have one callout per client and can just expand that client's callout to add time to their time tracker.

So, my use-case is wanting to use collapsible callouts to contain multiple timers all in one note so that I have one central space where I can track time for different client-billable work.

Thanks for considering this!

jacobtread commented 1 month ago

This is a bit difficult due to the syntax of callouts with all the lines starting with > it messes up the logic used to save the timekeep data since the code that replaces the codeblocks is not aware of this extra syntax.

It renders just fine as the parsing of timekeep code blocks is done by the obsidian markdown parser before the contents reach the timekeep logic.

Will give a look into this when I have a chance.

I believe a viable alternative would be instead to use headings? As those are also foldable without breaking the saving logic

jacobtread commented 1 month ago

Gave this a shot but it doesn't seem to be something I can do.

Obsidian doesn't seem to correctly report that start and end lines of the codeblock when they're inside of a callout. Instead giving that start and end lines of the callout itself so timekeep cannot properly parse this in order to write back out the data.

Closing this as not planned