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

[BUG] HTML review comment deactivates block identifier #815

Closed
sebthoms opened this issue Dec 17, 2023 · 4 comments · Fixed by #856
Closed

[BUG] HTML review comment deactivates block identifier #815

sebthoms opened this issue Dec 17, 2023 · 4 comments · Fixed by #856
Labels
bug Something isn't working

Comments

@sebthoms
Copy link

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!

@sebthoms sebthoms added the bug Something isn't working label Dec 17, 2023
@ronzulu
Copy link
Collaborator

ronzulu commented Dec 18, 2023

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
Copy link
Collaborator

ronzulu commented Dec 30, 2023

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

@ronzulu
Copy link
Collaborator

ronzulu commented Jan 18, 2024

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
Copy link
Author

It works perfectly now.

Thanks a lot!

ronzulu added a commit to ronzulu/obsidian-spaced-repetition that referenced this issue Feb 3, 2024
st3v3nmw added a commit that referenced this issue Mar 9, 2024
… (#834)

* First bit of implementation

* Slight refactor of parse()

* Enhanced parser to return first and last line numbers

* Finished impl for enhanced parsing for multiple topics per note, updated existing test cases (haven't fixed main.js or added all needed test cases)

* Implementation & testing continuing

* Comment change

* pnpm format; updated changelog.md

* pnpm lint

* Need to rerun lint after format, and rerun format after lint

* Updated flashcard user documentation

* Added code to access the frontmatter tags

* Fixed test cases after merging with #815

* lint & format

* Fixed unit test case

* Minor

* Minor post merge fix

* Lint

* Fixed test case

---------

Co-authored-by: Stephen Mwangi <[email protected]>
@github-project-automation github-project-automation bot moved this to Shipped! in Roadmap Aug 29, 2024
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
Status: Shipped!
2 participants