Open vjmartins opened 5 years ago
Trying to solve this exact problem…
Solved it… 💪
@LeaVerou how it's the proper/easy way to add a awesomplete-plugin
?
I just noticed this issue as well on a bilingual site I'm developing, for example the highlighting only reaches the 't' in sauté
After you type e, the result vanishes!
@caneco can you share the fix?
@LeaVerou this appears to be a bug/possible regression?
I noticed accent highlighting does work if input and value characters match exactly. Accent character cannot be searched if value is also not accent, and vice versa. There's probably multiple ways to handle this.
@vjmartins your solution doesn't work with french keyboards, if someone actually types with accents, no results will display.
@LeaVerou how it's the proper/easy way to add a awesomplete-plugin?
There is no specific way right now, but I would love to add a directory of plugins!!
Hi..
Im trying to search accents words with a filter and work fine to me..But i need some help to highlight..
var comboplete = new Awesomplete("dstAutoComplete", { minChars: 2, filter: function(text, input) { return Awesomplete.FILTER_STARTSWITH(text.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), input.match(/[^,]*$/)[0]); }, });
In this example word So and Só must be highlight.
Sorry my english.