anki-hierarchical-tags
anki-hierarchical-tags copied to clipboard
Do not create unnecessary stars at filter's end
Known Issues
When clicking on a tag in the hierarchy, an asterisk is added to the search term. The effect of that is that all notes with that tag and all subtags are searched for.
But a side-effect is, that all tags with the same prefix are matched. For example if you have a tag
it
and a tagitalian
, clicking on the tagit
would also show content fromitalian
. Let me know if this affects you and I'll try to work around this.
It is total disaster for me.
I have tags Lektion1
, Lektion2
, ... Lektion10
, Lektion11
, ...
When I click Lektion1 then I see common list for Lektion1, Lektion10, ...
Yes, I know, I can use label Lektion01
, but it is temporary workaround,
it is not a solution.
THE solution is here: add ::*
only on middle tiers.
There seem to be two small issues with this fix:
-
If both tags
language::java
andlanguage::java::streams
exist, then the search bar representation of the tag does not include the desired::*
. This omission is a result of this line of code, sorting the array of tags alphabetically. When iterating through the array, thelanguage::java
tag is encountered first,java
is calculated to be the tertiary tag tier, and the tree is updated with a search query without a::*
. Later, whenlanguage::java::streams
is processed, the'language::java
tree entry already exists, so nothing is updated. Reversing the iteration order could fix this issue, but not the following one: -
Regardless of whether
language::java
orlanguage::java::*
is used, neither query is able to capture both cards with the clicked-on tag as well as all subtags. The solution that I have found is to write a query likelanguage::java or language::java::*
. As soon as I submit a pull request I will link to it here.