jasonwilliams / anki

Anki VSCode Plugin
MIT License
273 stars 31 forks source link

Tags are not updated upon the note update #119

Open powerarmorpatch opened 9 months ago

powerarmorpatch commented 9 months ago

Hi @jasonwilliams awesome extension :star: , really helpful and time-saving! I've done some testing for tags. Used your example from readme. Here are some findings:

Anki for VSCode v1.3.1, Anki Linux desktop 2.1.66, AnkiConnect 2023-04-11.

Some test cases: 1. Initial upload from example: ```md ## Binary tree 1 In computer science, a binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. [#algorithms](./algorityms.md) [#OOP]() [#binary tree]() ``` only `[#algorithms](./algorityms.md) [#OOP]()` were upladed as tags. 2. Next, I've added some tags with / without source and **updated** the cards. There were no new tags after the update in "Binary tree 1" cards ```md ## Binary tree 1 In computer science, a binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. [#algorithms](./algorityms.md) [#OOP]() [#binary tree]() [#UPDATE_CAPS_NO_SOURCE]() [#UPDATE_CAPS_WITH_SOURCE](./fake_source.md) [#update_small_no_source]() [#update_small_with_source](./fake_small_source.md) ``` 3. I've created **new card** and added some tags with / without source in CAPS / small letters, all in snake_case. ```md ## Binary tree 2 In computer science, a binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. [#algorithms](./algorityms.md) [#OOP]() [#binary tree]() [#INITIAL_CAPS_NO_SOURCE]() [#INITIAL_CAPS_WITH_SOURCE](./fake_source.md) [#initial_small_no_source]() [#initial_small_with_source](./fake_small_source.md) ``` All tags were appeared in Anki except `[#binary tree]()` 4. I've **updated card** Binary tree 2 with some `#update` tags with / without source in CAPS / small letters, all in snake_case. No updated tags were added to Anki. ```python ## Binary tree 2 In computer science, a binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. [#algorithms](./algorityms.md) [#OOP]() [#binary tree]() [#INITIAL_CAPS_NO_SOURCE]() [#INITIAL_CAPS_WITH_SOURCE](./fake_source.md) [#initial_small_no_source]() [#initial_small_with_source](./fake_small_source.md) [#UPDATE_CAPS_NO_SOURCE]() [#UPDATE_CAPS_WITH_SOURCE](./fake_source.md) [#update_small_no_source]() [#update_small_with_source](./fake_small_source.md) ``` 5. I've uploaded **new card** with various new tags - CAPS / small letters, underscore / space delimiter, with / without source. ```md ## Binary tree 3 In computer science, a binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. [#ALL CAPS WITH SPACE NO SOURCE]() [#ALL_CAPS_NO SOURCE]() [#ALL CAPS WITH SPACE WITH SOURCE](./fake_source.md) [#ALL_CAPS_WITH_SOURCE](./fake_source.md) [small with space no source]() [small_no_source]() [small with space with source](./fake_source.md) [small_with_source](./fake_source.md) ``` Only `ALL_CAPS_WITH_SOURCE` was added as a tag. 6. I've uploaded **new card** with tag with spaces as delimiter inside the tag. ```python ## Binary tree 4 In computer science, a binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. [small with space no source]() [small with space with source](./fake_source.md) ``` No tags were uploaded to Anki.