Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature suggestion: avoid creating duplicated flash cards when sending to anki #13

Open
songguoqiang opened this issue Sep 12, 2020 · 4 comments
Labels
Upstream This is a bug outside the control of Anki for VSCode

Comments

@songguoqiang
Copy link

In the current version (0.3.0), if I push the same markdown file twice to anki, duplicated cards are created in anki.

Can we automatically detect the duplicates (e.g. by comparing front side of cards)?

@jasonwilliams
Copy link
Owner

jasonwilliams commented Sep 12, 2020

The only time a duplicate happens is if you push the same card to different decks. It definitely shouldn’t be possible to create duplicates in the same deck. The API guards against this already.

I’ve tested this manually and never had duplicates.

@songguoqiang
Copy link
Author

My anki version is 2.1.33

This is the markdown file I was testing with

TypeScript

TypeScript: Utility Type: Partial<Type>

Test

When I executed the command "Anki: Send to Deck" a few times, I got the duplicates in Anki, all under "notes" deck. Here is the screenshot

image

@jasonwilliams
Copy link
Owner

Thanks
I will take a look, it could be a possible regression

@jasonwilliams
Copy link
Owner

@songguoqiang I've been able to reproduce this by using certain characters.
It looks like the > character gets converted to &gt; and for some reason AnkiConnect or Anki cannot discern that it is unique. If you try the same without the < > it should work.

Im not sure why special characters break the duplicate check, i would need to raise it with AnkiConnect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upstream This is a bug outside the control of Anki for VSCode
Projects
None yet
Development

No branches or pull requests

2 participants