anki
anki copied to clipboard
Anki screws up formatting using `[...]` and `[...]+` buttons
Update January 2025: Still doesn't seem to be resolved
This problem is especially annoying when using cloze deletions with rendered Markdown code blocks:
- Cloze tags that wrap text to the end of a line:
- Tends to "pop" the cloze contents outside of it's parent
<span>tag- This breaks the Markdown code block's formatting
- Multi-line select within a cloze can break the
font-familystyling
- And doesn't always look good on hide/reveal
This makes it harder to do some nice things with the code blocks and keep formatting within fenced code blocks. It isn't an easy fix on their side (the Anki devs) either.
I've logged a couple of complaints, but don't see this being resolved anytime soon. The Cloze deletions general purpose was, for instance, hiding a verb within a sentence, so our use here is outside of it's core goal.
Fix suggestions
- Select "Rich Text" view and write cloze deletion tags manually
- This seems safer than using the buttons.
- Select up-to but not including the last character per line
- Then go into code view and move the
}}brackets to after the last character on that line - But within it's parent line
<span>tag
- Then go into code view and move the
- Use ONE cloze deletion per line
- Sometimes "blocks" (multi-line) cloze deletions work ...
- But sometimes they completely break formatting of your Markdown code blocks 😔
- Or, for guaranteed safety, use the
Missing!card for one-liners only- And try to have cloze tags within the line, but not up to the end of the line.
- That sucks and is limiting I know.
https://github.com/badlydrawnrob/anki/assets/1176875/39b57600-fa2d-4940-82db-23f6f6674766