Extra tags after tag renaming
gycsaba96 opened this issue · 4 comments
Renaming a tag that is a prefix of another tag adds unwanted tags to other tasks.
Steps to reproduce:
- Create a task with an
@apple
tag. - Create a task with an
@applepie
tag. - Rename the
@apple
tag using the sidebar's "Edit..." feature to@orange
. - Open the second task and observe the unwanted
@orangepie
tag.
The main cause is possibly that the corresponding method uses a simple search-and-replace for tag renaming. (The code should ensure that it replaces only whole tag names.)
Hmm, I wonder if this might be an explanation for the long-standing super annoying tags duplication issue, #605 ?
It would be awesome if you could try fixing both your issue and that one (if they are not exactly the same) simultaneously :)
I think the unwanted tags appear for different reasons in the two cases. Here, we have a faulty renaming. In #605, the tag parsing kicks in too early. (There, we could consider preventing the processing of the current word when parsing the tags.)
Nevertheless, I can take a look at both of them. :)
No, this is still a work in progress. PR 1062 was only for 605.