reuseman / flashcards-obsidian

🎴 An Anki plugin for Obsidian.md
MIT License
897 stars 87 forks source link

use the new obsidian callout syntax #107

Open plasmaboyer opened 2 years ago

plasmaboyer commented 2 years ago

here is an syntax idea to declare the flashcard using the new callout syntax :

> [!CARD] : question > Answer line 1 > Answer line 2

reuseman commented 2 years ago

It seems that there is interest in this feature, so it seems a good one. For the moment being I don't have enough time, but if someone does a pull request I am going to accept it

maxenceplebrun commented 2 years ago

Rather than creating a new card type completely, would it be possible to apply a REGEX filter to the field name so that it ignores callout syntax? Something like this maybe: /\[![A-Za-z]*\]-? /

You could then use the existing "#card" syntax to create new cards that ignore the callout brackets. This card would for example work:

> [!CARD] : question #card
> Answer line 1
> Answer line 2