Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@harvesthq/chosen-developers This fixes #75 (which has been around for 2 years already..), #1463 and actually also #1216, because the provided solution over there won't work.
By making use of word boundary matching (http://www.regular-expressions.info/wordboundaries.html) the split word search is much cleaner (no more actual splitting of strings), and the search results are better.
Example:
There is a Chosen select box with the option 'Heard Island and Mcdonald Islands' (like on the example page). With
enable_split_word_search
set totrue
(default) searching for 'and Mc' won't show any results. Although searching for 'and' and 'Mcdonald' does.With my modifications the results will show as expected.