Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exact matching should only look at the title text #45

Open
bmcclure opened this issue Mar 26, 2023 · 0 comments
Open

Exact matching should only look at the title text #45

bmcclure opened this issue Mar 26, 2023 · 0 comments

Comments

@bmcclure
Copy link

bmcclure commented Mar 26, 2023

I have both "Home" and "ESPHome", and without exact matching "Home" matches both items. But when I turn on exact matching, it doesn't seem to work. I tested it on all of my items, and it only matched a few of them even though I am using the correct exact titles.

Looking at the code, I think that might be because it uses the innerHTML JavaScript function. It has some code that strips out a specific empty comment string (twice?), however many of my sidebar items have seemingly random IDs inside that comment string, so I think the entire comment is being included in the exact match condition.

Would it make more sense to use textContent instead of innerHTML so that it only includes the actual visible text? Then there should also be no need to try and strip the comment tags out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant