From e36f019ec234600e79722ec4a95aea3b81f14603 Mon Sep 17 00:00:00 2001 From: Erez Volk Date: Thu, 2 Jan 2020 21:05:56 +0200 Subject: [PATCH] Split tags on spaces, not commas --- lib-python/anki/importing/noteimp.py | 2 +- lib-python/tests/test_importing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib-python/anki/importing/noteimp.py b/lib-python/anki/importing/noteimp.py index e4b95dde0..eb11504cc 100644 --- a/lib-python/anki/importing/noteimp.py +++ b/lib-python/anki/importing/noteimp.py @@ -275,7 +275,7 @@ content in the text file to the correct fields.""" return [intTime(), self.col.usn(), n.fieldsStr, tags, id, n.fieldsStr, tags] elif self.tagModified: tags = self.col.db.scalar("select tags from notes where id = ?", id) - tagList = self.col.tags.split(tags) + self.tagModified.split(",") + tagList = self.col.tags.split(tags) + self.tagModified.split() tagList = self.col.tags.canonify(tagList) self.col.tags.register(tagList) tags = self.col.tags.join(tagList) diff --git a/lib-python/tests/test_importing.py b/lib-python/tests/test_importing.py index 9cafe817d..ae7406fc1 100644 --- a/lib-python/tests/test_importing.py +++ b/lib-python/tests/test_importing.py @@ -249,7 +249,7 @@ def test_tsv_tag_multiple_tags(): tf.flush() i = TextImporter(deck, tf.name) i.initMapping() - i.tagModified = "five,six" + i.tagModified = "five six" i.run() n.load()