michalrus / anki-simple-cloze-overlapper

Simple Cloze Overlapper template for Anki 2.1 (probably any version, as it's JavaScript-only)
76 stars 13 forks source link

Handle multiple clozes with the same number, e.g. two different `{{c2::*}}`s #4

Closed michalrus closed 1 year ago

michalrus commented 1 year ago

@gianDgiant wrote on 2023-02-25T11:44:00Z in the original Gist:

@michalrus First of all, thank you so much for making this.

Can you make it possible for a card like this to be generated properly?

{{c1::Simple Squamous Epithelium}} is described to have:

  • {{c2::single}} layer of {{c2::flattened}} cells
  • {{c3::disc}} shaped {{c3::central}} nuclei
  • {{c4::sparse}} cytoplasm {{c99::ask-all}}

If I were to generate that with the latest version, it skips the first c2 and c3 words. Thank you.

michalrus commented 1 year ago

@gianDgiant that looks useful, let me try! ⌛

michalrus commented 1 year ago

I think it should be solved now in 0dcb0a4ed2f6870a25cb3d46b9c635fe70f5e946.

@gianDgiant, can you check it out and let me know? Feel free to reopen if something is wrong

issue-4

gianDgiant commented 1 year ago

It works just as I wanted. Thank you so much!

gianDgiant commented 1 year ago

@michalrus The note won't generate cards properly if the clozes with the same number also have the same words. Try making a card with this to see.

blah blah blah {{c1::A}} to {{c1::B}} {{c2::B}} to {{c2::B}} {{c3::B}} to {{c3::C}}

michalrus commented 1 year ago

@gianDgiant OK, it's more resilient now, thanks! =)

Should be fixed in 7e1eb9463ae8454c34790059261d4863ab2a1b7c:

issue-4-2