hadynz / obsidian-sidekick

A companion to identify hidden connections that match your tags and pages
134 stars 9 forks source link

Plugin highlights everything #4

Closed scriptor-dga closed 2 years ago

scriptor-dga commented 2 years ago

I have a note called [[Joseph]]. Now the plugin highlights every word containing jo (also in the middle of the word). So I think that the plugin should only highlight entire words when they are contained in the titles of other notes.

Obsidian_OfpdqYrzZh

hadynz commented 2 years ago

Yup, I noticed that too, and will fix.

However... can I confirm something: do you have an alias of jo defined for your [[Joseph]] note? That's the only way I can see why you are seeing the partial highlighting.

scriptor-dga commented 2 years ago

You're right, I did have an alias Jo. 😅 However, the highlighting stayed even after modifying the alias.

hadynz commented 2 years ago

the highlighting stayed even after modifying the alias.

Good call. This could be a bug. The plugin should re-index all your files and tags after every change, and unhighlight in some cases.

If you reload Obsidian or stop/start the plugin this should fix itself for now.

shabegom commented 2 years ago

+1 to only highlighting whole words, or having a setting to choose. I have a tag #q for questions, but it is now highlighting all the q across me vault.

Very cool plugin!

hadynz commented 2 years ago

Just an update on this issue – I am looking to overhaul how searching works and actively working on the new solution. This solution will definitely be fixing this issue of partial highlights.

Will share an update here when resolved. Appreciate your patience.

HEmile commented 2 years ago

It's also highlighting everywhere throughout my file, and it's not highlighting based on the correct searchwords (I checked in the code). The highlights should probably only work when surrounded with whitespace? And I think what I'm seeing is really a bug. Might have something to do with some offset in CM6.

image

hadynz commented 2 years ago

This should be fixed in 1.1.0. If you can try and confirm that would be great.

HEmile commented 2 years ago

Doesn't seem to be doing this anymore, no!