badlydrawnrob / anki

Learn to code with Anki — flashcards and themes for all learning levels. Master your programming language of choice!
MIT License
742 stars 63 forks source link

Be strict about the optional fields? #105

Closed badlydrawnrob closed 2 months ago

badlydrawnrob commented 9 months ago

⚠️ Unless Anki complains, it's safe to leave as-is.

Currently I've got a few of the fields as optional (in the card fields with the use of icons; in the HTML code with moustache conditional tags) — yet I'm advising a simple card with just a title and a note, which sort of breaks those rules.

  1. Do I need to conditionally load every moustache tag (except title)?
  2. As Anki doesn't require conditional tags, is it ok to not do this?

Anki has conditional fields which are (almost) identical to Moustache — there should be no space between # or ^ and the fieldname.

badlydrawnrob commented 2 months ago

I think this is safe to leave as-is. For now, at least, it doesn't break anything.