Obsidian_to_Anki v3.4.0 - a feature-rich plugin that allows you to add notes from Obsidian to Anki

I have a problem when using Hint to cover a text, eventho it works for adding the field it also added the content for this field to the one before it (adds it twice). I think it is a bug. Does anyone have the same problem?

P.S.: Nevermind, the cause is the problem with regenerate button not working and updating fields again. sometimes it works and sometimes it doesn’t. hope the devs fix this one soon. I can’t use this plugin like this.

I’m frequently getting errors syncing this plugin, with this error thrown

VM141:667 Uncaught (in promise) TypeError: this.field_names is not iterable

It went away for a while, and now is back. Anyone experienced this/got a solution?

The same error is thrown when trying to regenerate the note type table.

Edit: upon further inspection, from what I can see the plugin doesn’t update its note types properly when you change the name of note type in Anki.

Found the issue already reported in github with a workaround: Renaming note-types breaks them · Issue #177 · Pseudonium/Obsidian_to_Anki · GitHub

1 Like

It is a weird bug, as it works sometimes but doesn’t most of the times

Hey! Is there any regex that supports empty line? EG:

This is the question? #flashcard
This line is included

This line is not included when using any regex;

I want to include these lines aswell

And its the similar story with Q/A regex. So i searched the github issues, and found this regex that includes empty lines and stops when 2 empty lines are found:
^Q: ((?:[^\n][\n]?)+)\n+A: ([\s\S]*?(?=\n{3,}))
But the problem with that is when the Question/answer is modified, it creates a new card instead of updating the new one.

Does anyone have a regex that works with empty lines?

Is using hidden paragraph supported? The below format works, but will it be supported in the future, I don’t want to redo everything after a minor update breaks everything.

<p hidden>
Back: </p>


<p hidden>

Thus only “Answer” is visible in preview mode.

I try to setup Obsidian to Anki , I am on Linux, It says that it connect without a problem, but when I want to add dummy card

# Overall point

## Subheading 1

## Subheading 2

This is a test.
Back: Test successful!
Tags: Testing

the extension says that it connects and is adding all media but nothing appears in the anki deck that I choose in the settings. This might be a bug or I am doing something wrong? I am on anki 2.1.42

I like the hidden approach. I created a css snippet which will probably also work in the future CSS for Obsidian to Anki

Is there a way to tell this plugin not update certain fields to anki? Or make it updated from anki so that when I sync agian it doesn’t delete all the things I’ve added to that note in anki?
RIght know the only way I can think of, is to delete the note in obsidian after the first sync

have you solved the problem? I’m having the same one with Windows

UPDATE: The note type in my version of Anki (2.1.43 (0fbae6bc)⁩ is not <, but is <<Basic (optional reverse order)>>. If I use that value, the process works.

Basic (optional reversed card)
Front message
Back message

I’m having the same problem on Mac

1 Like

Is there a regex for the normal header paragraph style: ^#+(.+)\n*((?:\n(?:^[^\n#].{0,2}$|^[^\n#].{3}(?<!<!–).*))+), but with multiline paragraph (spaces between lines)?

I am using the regex code(cloze paragraph style) to deal with cloze deletion in obsidian.
The regex code for basic cloze cards are very simple which even works with only “{ }”.

I have made a separate card in Anki for “cloze answer typing” where answer needs to be typed.
But I am unable to tweak the code to work with the card.

The code works fine if I use them for only 1 card type either basic cloze or cloze answer typing. But I want both of the card types to work with regex code.

Can anybody help me in tweaking the code so that I the “cloze typing” will also work ?
e.g. "x{cloze information}x"
where x is any symbol or if possible any letter.

@Pseudonium I have the same problem as @sutzig and @sirredcrosse . Some time ago, I created some cards in Obsidian, and it worked without problems. Today I wanted to add more cards, but they weren’t added to my Anki deck, without an error. It’s interesting, though, that changing old existing cards works: after the click on the Anki button they are updated in Anki immediately. Any idea what I could try?

@sutzig , @sirredcrosse : did you find a solution?

IIRC, I was entering the regex in the wrong box altogether. I don’t currently have Obsidian on the computer I’m typing this post from [new desktop; it’s on my laptop] but if I get back to my laptop, I’ll let you know if I did in fact find a good solution. I hopped through a couple other options and know I eventually came to one that gave me what I wanted, but I can’t recall if it was with this particular plugin.


I wonder if there is a way to auto reset editing card on obsidian ?

For example, I edit a card and when I sync it to anki, this card will be reset to study it directly.

Is someone already use anki with admonition style ?

I’m trying to escape with regex something like this :

??? ad-question Q: Title goes here?

A: content1

--- admonition

I think there is better inline admonition now.

> [!question: What is this?]
> Answer

You can hit and try and learn on regex101.com

Use a regex for a very similar structure to what you have, and try to modify it.
I used to do the same. For example if there is a regex for Q: What is this?.. then you can simply choose it and prepend the extra stuff. Something like that.

I don’t use it anymore. I shifted to Spaced Repetition plugin since this tool wasn’t maintained. :frowning:


Thank for your message.

The problem with this code is that you can’t add image don’t you ?
Or sync with anki after that.

I know that a space repetition exist in obsidian but I use a lot of fonction of anki so I can’t use obsidian alone sadly.

Images worked fine as far as I remember!!