Anki Forums

Import/Export causes unwanted duplicates

Test:

Export deck, then immediately import the file afterwards. Deck contains cards with whitespaces and   that are not preserved during export, causing Anki to believe they’re new cards and creating them when importing again.

Why is this important?

Anki doesn’t give much control when it comes to card modification beyond the find/replace. So I tend to export my cards, modify them elsewhere and import them back again. Some cards however have   and trailing spaces (since I paste from online a lot), this causes importing issues.

Demo Video: https://youtu.be/jBfjcHX-aDw

Expectation :

0 cards added, 0 cards updated, X cards unchanged.

Reality :

X cards added, 0 cards updated, X cards unchanged.

I’ve made a note on refactor import/export code · Issue #1018 · ankitects/anki · GitHub