ObsidianToAnki / Obsidian_to_Anki

Script to add flashcards from text/markdown files to Anki
GNU General Public License v3.0
1.51k stars 132 forks source link

Anki cards inside callouts #389

Open csandbrink opened 1 year ago

csandbrink commented 1 year ago

In Order to have a clean markdown file, I think it would be nice to have the ability to put all cards into a collapsed callout e.g. >[!question]-. Unfortunately, the obsidian_to_anki plugin doesn't recognize cards with the regular syntax inside callouts. Can you add support for this, please?

fastrick commented 6 months ago

Regex:

^> \[!qa\] (.+)\n> (.+(?:\n(?:^.{1,3}$|^.{4}(?<!<!--).*))*)

Markdown Pattern:

> [!qa] Does callout pattern works?
> Yes!