Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bujo: Record Time not behaving as expected #25

Open
Aodhagan opened this issue Aug 8, 2022 · 3 comments
Open

Bujo: Record Time not behaving as expected #25

Aodhagan opened this issue Aug 8, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Aodhagan
Copy link

Aodhagan commented Aug 8, 2022

Im using Bujo in conjunction with Dendron. I have a markdown file open that contains a time track table. I can insert a task using Bujo: Schedule Entry command. When I place the cursor on the row of the task I am starting and run the command Bujo: Record Time the time is inserted into the "Tracker" column of the table. i.e., current_time- e.g., "14:30-"

However when I run Bujo: Record Time it does not behave as demonstrated here and here

Instead it results in current_time-previous_time- e.g., "15:00-14:30-"

If I repeat it will be "15:01-15:00-14:30-" etc.

I am running the latest VScode update on Windows 10.

@Aodhagan
Copy link
Author

Aodhagan commented Aug 10, 2022

I found that if there was no space between current_time- or 11:30- and the pipe | denoting the end of the table cell then the above behaviour occurs. I had to manually place a space between the dash - and the pipe and the command worked as expected.

Also thanks for making this extension. I think it will be very useful for me.

@mihaiconstantin
Copy link
Owner

Thanks for looking into this, @Aodhagan! The issue seems to be due to the regex I use to parse the time record. I am glad to hear that adding the space between the dash and the pipe fixed it. However, I will check to see if I can make the regex a bit more robust.

@mihaiconstantin mihaiconstantin added the bug Something isn't working label Aug 10, 2022
@Aodhagan
Copy link
Author

Aodhagan commented Aug 15, 2022

Just an FYI. As it stands Bujo: Record Time will behave correctly or as expected if the time track table is fully expanded - as in the editor window is wide enough so that each row of the time track table is on a single line of the editor window.

If you narrow the width of the editor window such that the rows of the table wrap over multiple lines of the editor then the above issue occurs.

*edit - one also needs to not have the Markdown All In One extension installed for the above to be true. After installing this extension Bujo: Record Time works fine regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants