hadynz / obsidian-sidekick

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

fix: Escape + signs in search #8

Closed HEmile closed 2 years ago

HEmile commented 2 years ago

This fixes the crashes when creating the highlights, when some names include a + character. You might prefer to do this replacement in the index instead of in the search, I'm not sure.

I also added a failsafe in the getSuggestionReplacement. I have many wrong highlights in my file that crash on this statement because it cannot find the corresponding string in the index.

hadynz commented 2 years ago

Thanks so much for making this change @HEmile and trying to fix the plugin.

I've just finished pushing a significant rewrite for how the plugin does search under the hood in #9. This has meant that your PR has become out of date. I am hoping that this change should remove the issue with special characters that was tripping the plugin.