Since the styling for selected tags was changed into using checkboxes, it's now pretty hard to see which related tags are used. Example
I pushed Version 28.14 to the master branch which adds an additional "*" indicator to the left of selected tags, as well as a few other minor changes/fixes.
I noticed, when trying to remove a tag by typing -tag, that the - disappears after using autocomplete.
Pushed Version 28.20 as a fix for that. Also, I noticed that the main Danbooru's autocomplete is broken, as autocomplete no longer works with category prefixes.
There's also other random terms that don't highlight, you can see in this screenshot that 1girl and ah-1g_hueycobra have no boldness.
Edit: seems the problem is much more widespread that I previously realized: example. And the results are now ordered in a nonsensical way after I purged the cache to try and see if that fixed it.
Pushed Version 29.5 which accounts for the hyphen in word matching.
At this time, asterisk match highlighting won't be added since technically, they aren't word matches and follow a completely different pattern for portion highlighting. You can see this by comparing the following two API calls.
I'll work on adding asterisk matching in, but it'll take some time, and I'll make it an additional setting, since as I already stated, they aren't technically word matches. I'll probably reuse the same CSS class for that though, but add another class so that the two types can be differentiated and styled differently if desired.
There's also other random terms that don't highlight, you can see in this screenshot that 1girl and ah-1g_hueycobra have no boldness.
Edit: seems the problem is much more widespread that I previously realized: example. And the results are now ordered in a nonsensical way after I purged the cache to try and see if that fixed it.
Those are all most likely user choice matches, i.e. tags you've selected in the past. You can add styles to .iac-user-choice in order to visualize these. When a tag is selected, whatever type of data is on the match, including the source, gets saved and lasts for as long as that user choice entry remains in the user choice data cache.
This can be fixed in either one of two ways:
1. Purge the entire user choice data cache
IndexedAutocomplete Settings >> Cache editor
Data source: Local Storage
Data name: choice-info
Click "Delete"
2. Edit individual entries
IndexedAutocomplete Settings >> Cache editor
Data source: Local Storage
Data name: choice-info
Click "Get"
Find entries underneath the "choice_data" key and change the "source" to the desired type.
I was searching for a selector to always highlight just like vanilla danbooru no matter the internal logic for why the tag is showing up.
As for cache purging, I did "Purge cache (...)" and it didn't clear them out. The description for that option says "Dumps all of the cached data related to IndexedAutocomplete" so I'm assuming it's bugged. Removing it manually as you said worked though.
I was searching for a selector to always highlight just like vanilla danbooru no matter the internal logic for why the tag is showing up.
Ah sorry, I misunderstood. I didn't realize that Danbooru was highlighting the matches for all of the sources, so I've only implemented that for word matches as of right now. That's something that will need to be worked on. I'll try to have something out by next weekend.
As for cache purging, I did "Purge cache (...)" and it didn't clear them out. The description for that option says "Dumps all of the cached data related to IndexedAutocomplete" so I'm assuming it's bugged. Removing it manually as you said worked though.
Yeah, that might be a bit of a misnomer, or rather, I'm reusing the term "cache" sometimes for program data when I should be using terms like "storage" instead. The "Purge cache" link currently only purges all data from the Indexed DB (API data from Danbooru), and nothing from Local Storage (program data). The reason being that it contains important information that the user may not want to delete, plus it could have unintended consequences with program behavior. However, one way which currently exists to clear the choice data though, besides doing it manually, is to do a factory reset.
That all being said, I could look into adding something which would purge all program data minus the user settings as something to implement in the future for all of my userscripts.
Ah sorry, that was from the Danbooru code that I copied over. I haven't really given any of that the once over; I just copy/pasted it. Anyways, fixed in Version 29.8.
Seems some tags are rendered incorrectly. I noticed it with tags missing underscores: bai_lan_gen(1845106313) is shown as "bai_lan_(1845106313)" but gets added correctly when hitting tab.