What I’m trying to do
I want to create cloze deletion cards in Anki using Obsidian_to_anki plugin and define my clozes using ==
highlight syntax to keep my notes looking clean.
Things I have tried
The documented regex for Cloze-Paragraph-style works fine for me. However, the documented highlight-cloze style does not.
What I’ve done:
-
Cloze Custom Regex in Note type table:
((?:.+\n)*(?:.*==.*)(?:\n(?:^.{1,3}$|^.{4}(?<!<!--).*))*)
- copied from here
- CurlyCloze - Highlights to Clozes in ENABLED.
- Added the following markdown to a file in my Vault, and Sync Vault:
IPSEC provides ==Authentication==
…I get all the expected successful notifications about the sync, but nothing appears in my target Anki deck (Default).
I have vetted my setup using Basic regex cards using the documented Sub-header style which creates cards just fine, as do basic and non-highlight cloze types.
I wasn’t sure if there could be an issue with the documented regex, so I put it and my test line from above into regex101.com, I see there is a single match group, matching the entire string:
…and looking at the docs for writing custom regexes in this plugin, it says:
You need to have as many capture groups in your regexp as there are fields in the note type
… and the Anki docs for cloze-deletion implies that for the cloze note type there is only a single field, so I think (?) this regex/match should be as expected. Do you see anything wrong here?