From 4cfeb094a32d8efd74e11c28b60ee0205270c369 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Fri, 28 Jul 2017 23:52:42 +0200 Subject: [PATCH] restore case sensitive searching --- coffee/lib/abstract-chosen.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coffee/lib/abstract-chosen.coffee b/coffee/lib/abstract-chosen.coffee index 9ac069df168..8b68764ebf8 100644 --- a/coffee/lib/abstract-chosen.coffee +++ b/coffee/lib/abstract-chosen.coffee @@ -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)