It would be nice to be able to customize the highlighter to allow accent-insensitive highlighting in a similar way the queryTokenizer can be customized.
See also #627, #271.
I agree, that would be an awesome feature. Here's the project I based the typeahead.js highlighting code around, probably wouldn't be too hard to modify to accept a accent folding map.
I created a fork which achieves this. I have not opened a pull request because I am sure there is a better way to do this, but in case someone needs something quick and dirty, here it is: https://github.com/wakingrufus/typeahead.js/blob/master/src/typeahead/highlight.js
Thanks @wakingrufus! Your solution works well for my purposes.
+1
I have updated my solution to take an option rather than be default behavior. I still have the diacritic map in the highlight.js file, which doesn't seem like the best way to do it. @jharding, would you be willing to take a look at a pull request for this?
+1
I haven't heard any response, but opened a pull request anyway. Please let me know if there is anything that should be changed in my code.
+1
+1
+1!!!
Any advances on this?
I Opened up my same PR in the coreJS fork here: https://github.com/corejavascript/typeahead.js/pull/51
as this repo was abandoned.
+1000, why this issue is snubbed so?
@wakingrufus PR for this at corejavascript/typeahead.js#51 is now merged! :+1:
+1!!! but I cannot find a documentation how to config typeahead to use e.g. diacriticInsensitive. Do a documentation exists?
@phlegx it is passed as an option to highlight(), same as caseSensitive:
highlight({ node: testNode, pattern: 'xxx', diacriticInsensitive: true });
However, I am not sure how this option can be passed in from the top level of typeahead. Please see my comment here:
https://github.com/corejavascript/typeahead.js/pull/51#issuecomment-174022503
Most helpful comment
@wakingrufus PR for this at corejavascript/typeahead.js#51 is now merged! :+1: