Obsidian_to_Anki icon indicating copy to clipboard operation
Obsidian_to_Anki copied to clipboard

Whitelist folders or files

Open jonnymaceachern opened this issue 2 years ago • 2 comments

Is it possible to whitelist certain files or folders?

For example, I'd like to use the Header paragraph style without having the regex attempt to match everything in my vault.

jonnymaceachern avatar Jun 25 '22 19:06 jonnymaceachern

I second that!

Mangolia-club avatar Jul 05 '22 08:07 Mangolia-club

Hey there, I figured out a way to avoid that. As for me, I want to generate a card that uses a ### title as front and the content underneath it(contains every 4# title and 5# title, in another word, it spans from the title to the next title which has the same or higher level or the end of the document) as back. I wrote a regex to do that: ^(#{3} .+ #card)\s((\S|\s)+?)(?=\s#{1,3} |````````````) To generate the card correctly, you have to add a tag "#card" after the title which you want to create a with, and add ```````````` (12 of `, or you can customise that by changing the syntax above) .

As for me, I put the 12 into my default templete and just write documents like the usual way. When I want to create a card, all I have to do is add a#card` after the title.

You can try it out at regex101.com 2

Mangolia-club avatar Jul 09 '22 04:07 Mangolia-club