Cloze replacement should support line feeds
kriswuollett opened this issue · 3 comments
Currently trying to quiz myself on some code examples in a <pre>
block and use cloze on multiple chunks of code.
As a workaround I currently can put in multiple cloze entries with the same number, but that gives too big of a hint on how many lines are missing from the example.
Thanks for reporting this and sorry for the late reply. I have a fix which appears to work. Please see the change: 1952009
Basically the issue was with my regex. .
does not match newlines, but \s\S
does.
If you'd like to simply copy the full script without having to make the edits in the commit above, you can see it here: https://github.com/matthayes/anki_cloze_anything/blob/support_line_feed/examples/cloze_anything.js
Please let me know if this fixes your issue or if you notice any problems. I'll merge in the change sometime soon.