matthayes/anki_cloze_anything

Cloze not working with multiple example with numbers inside

lucamolteni opened this issue · 2 comments

According to documentation

Note: You can have more than one field with cloze content per note. For example, you could have fields Example1Cloze and Example2Cloze. Each can be used to generate cards.

But this regexp
/^[^\d]+(\d+)$/
Will match the first number and use it for the field.

By using

ExampleFirstCloze
ExampleFirstCloze1
ExampleFirstCloze2

and

ExampleSecondCloze
ExampleSecondCloze1
ExampleSecondCloze2

This works accordingly

Ah thanks for pointing this out. I intended for the regex to match the last number in the field name but currently it doesn't allow numbers within the field. I'll update the documentation and improve the regex separately.

Template fixed in 1ffae38