stefanopagliari / bibnotes

358 stars 30 forks source link

Missing line break on updated content when updating not (easy fix I think) #53

Closed Rhydderch closed 2 years ago

Rhydderch commented 2 years ago

Hi,

I noticed that when updating a note, the updated content (new inserted content) is missing a line break. So if I have not using double spacing, the new content will be added to the end of the previous line And when I use double spacing, the content will appear on a new line but will not have the double spacing (so again a line break is missing).

I hope you will be able to fix this :) !

Rhydderch commented 2 years ago

I think this bug might lead to some weird things happening once the content of a highlight has been changed in zotero or that the notes in Obsidian have been edited.

EDIT : Indeed, the fact that a line break is missing is causing the error if we want to update the highlights a second time. Manually adding a line break for new added highlight solves this

proposed fix: add one more line break to newly added highlights after an update

hujie12306 commented 2 years ago

I encounter the same question!

zhechenghu commented 2 years ago

Also encountered the same question.

stefanopagliari commented 2 years ago

Thank you for identifying this problem. I will look into it

stefanopagliari commented 2 years ago

@Rhydderch, @hujie12306, @Hu-Zhecheng could you please provide some more details on when does this problem emerge?

stefanopagliari commented 2 years ago

I think I have found a potential fix. Could you please paste this main.js file in the folder of the plugin, replace the existing one, and see if it solves the issue? https://www.icloud.com/iclouddrive/0a2CyBJM33oHxTpiZwkf6_BFA#main

zhechenghu commented 2 years ago

In my test vault, this issue is solved in version 0.9.156. I did not substitute the main.js file above nor test the version lower than 0.9.156. Thanks a lot for your work!