Skip to content

Commit

Permalink
restore case sensitive searching
Browse files Browse the repository at this point in the history
  • Loading branch information
koenpunt committed Jul 29, 2017
1 parent 21fa001 commit 4cfeb09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coffee/lib/abstract-chosen.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ class AbstractChosen
get_search_regex: (escaped_search_string) ->
regex_string = if @search_contains then escaped_search_string else "\\b#{escaped_search_string}\\w*\\b"
regex_string = "^#{regex_string}" unless @enable_split_word_search or @search_contains
new RegExp(regex_string, 'i')
regex_flag = if @case_sensitive_search then "" else "i"
new RegExp(regex_string, regex_flag)

search_string_match: (search_string, regex) ->
regex.exec(search_string)
Expand Down

0 comments on commit 4cfeb09

Please # to comment.