horsey
horsey copied to clipboard
How can I make highlighting case insensitive?
Letter highlighting seems to be case sensitive. I am just wondering how I might go about making it highlight letters regardless of uppercase and lowercase.
I took a look in the code it seems like the search gets around this by converting everything to lowercase, but ideally I would like to keep title case on my list items.
https://github.com/bevacqua/horsey/blob/master/horsey.js#L427 - the comparison happens here
I ended up using this JavaScript Autocomplete which highlights uppercase and lowercase searches out of the box. https://github.com/Pixabay/JavaScript-autoComplete
There's a PR for this here: https://github.com/bevacqua/horsey/pull/71