Preventing Accidental Cloze Deletion in AnkiHub

Recently, a few clozes have gotten accidently deleted inadvertently, due to editing errors in formatting, or other reasons, when editing the card on AnkiHub

To avoid this from happening again and affecting all our subscribers [who might unknowingly delete the missing card(s)], some ideas the @AnKing-Maintainers had were:

1 :arrow_right:
When accepting a suggestion that deletes a cloze that is present in the current version, we could have a warning pop-up that says “The suggestion you are accepting will be deleting a cloze entirely from this note. Are you sure you want to proceed?"

This would have to work if a cloze is deleted entirely. It would also have to ensure that if the cloze is split in the HMTL, it would trigger the warning too.

For example,

This is a {{c1::sample}} of a cloze card

wouldn’t appear as a cloze deletion if we’re not actively looking for it.
The HTML code would actually be

This is a {{c1:<b>:sample</b>}} of a cloze card

This would not show up as a cloze, cause the <b> tag split up the cloze c1::, thus deleting the card for everyone

2 :arrow_right:
Add a ‘Preview’ option to AnkiHub, similar to the ‘Preview’ on Anki, to visualize how it might look, after, like, for example, formatting or major changes to the card. Currently we copy-paste the HTML code into Anki and use the ‘Preview’ there, to make sure everything is alright, but having this natively built into the card editor in AnkiHub would save us all a lot of worrying and double checking

.
Thanks for all you do :slight_smile:

4 Likes

@ProductTeam

This is needed for the future at least.

To summarize, an underline in c1::AnkiHub in the second : can cause a close to be deleted. This is hard for maintainers to detect (we are humans :smiling_face_with_tear:) so a warning that tells us we are going to delete a close by accepting will be helpful!

4 Likes

Perhaps this can be included in some sort of system that checks formatting in general to make sure the card still abides by our formatting guidelines (such as checks spelling, removes &nbsp; (non breaking space), and maybe even things like no dashes if there’s only 1 sentence in the extra)?

1 Like

bump