ambrt / joplin-plugin-referencing-notes

42 stars 6 forks source link

Backlinks don't update if note is empty #3

Closed wittjosiah closed 2 years ago

wittjosiah commented 3 years ago

Just starting to mess around with Joplin as well as this plugin. Looks pretty great!

One thing I noticed as I was testing it out was that if a note/todo had an empty body the backlinks in the rendered body did not update. I'm not sure if this is a bug specifically with this plugin or a consequence of how Joplin handles empty bodies, but I thought I'd mention it.

My use case for this is linking to a todo which sometimes starts without any notes in it but are added later.

ambrt commented 3 years ago

Hi

Thanks for pointing this out. I think that what happens is that notes aren't "saved" instantly by Joplin. This means that if you create empty todo and link to it with other notes those backlinks aren't yet in database.

To be sure, can you create note with empty body, give it just title, link with other note AND click back and forth between notes few times (Possible hit Ctrl+S also).

wittjosiah commented 3 years ago

https://user-images.githubusercontent.com/4529818/106631938-3c169e80-654b-11eb-9962-a4ee279a7908.mov

Here's a little sandbox of what I've seeing right now. It seems like when going between empty notes the backlinks don't update but if coming from or going to a non-empty note it does.

ambrt commented 3 years ago

backlinks.mov Here's a little sandbox of what I've seeing right now. It seems like when going between empty notes the backlinks don't update but if coming from or going to a non-empty note it does.

Ok, i recreated this locally. Will try to check if i can fix this.

ambrt commented 3 years ago

Its a bug in Joplin or MarkdownIt. Basically if you switch between two notes that have same (not necessarily empty) content the re-rendering doesn't happen. Here's example with notes having same body: Peek 2021-02-02 19-16

I will post this to Joplin repo.