st3v3nmw / obsidian-spaced-repetition

Fight the forgetting curve by reviewing flashcards & entire notes on Obsidian
https://www.stephenmwangi.com/obsidian-spaced-repetition/
MIT License
1.53k stars 184 forks source link

[BUG] HTML review comment deactivates block identifier #815

Closed sebthoms closed 8 months ago

sebthoms commented 10 months ago

Thanks a lot for creating this plugin, @st3v3nmw! It has been extremely useful for me. There is just a small issue when creating flashcards from linked blocks.

Describe the bug Whenever a HTML review comment is added to a flashcard containting a block identifier, the block identifier gets deactivated. This results in the other file being unable to locate that block.

image

becomes this:

image

(I should probably add that I configured ">>" to be my flashcard identifier)

Adding the HTML comment on a new line solves this, but this unfortunately breaks list formatting in other flashcards.

Any help is appreciated!

ronzulu commented 10 months ago

For anyone looking to fix this...

From experimenting, it seems that the block identifier must be right at the end of the line.

If there is anything after the block identifier before the EOL, obsidian won't recognize it as the block identifier.

I think this can be fixed without adding a new user setting. I can't think of a reason why someone would want the current formatting. The following shows where the OSR info should be placed:

image

Format of block identifiers: https://help.obsidian.md/Linking+notes+and+files/Internal+links#Link+to+a+block+in+a+note

Block identifiers can only consist of letters, numbers, and dashes.

I.e. not just hex characters, e.g.:

"You do not rise to the level of your goals. You fall to the level of your systems." by James Clear ^quote-of-the-day

Cheers Ronny

ronzulu commented 9 months ago

I'll try and fix this over the next week. Unless someone else is busting to do it :-)

ronzulu commented 9 months ago

Hi @sebthoms and anyone else reading...

Beta release is now available.

There is a file called main.js in this zip file main_815A.zip

You will need to copy that to the obsidian plug-in folder, e.g. D:\Obsidian\Obsidian\.obsidian\plugins\obsidian-spaced-repetition

Then reload the plug-in, or restart obsidian.

Any feedback appreciated.

Ronny

sebthoms commented 9 months ago

It works perfectly now.

Thanks a lot!