From 4dba0638e5872318423bbc9c13f4fbebf3b14ce9 Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Wed, 2 Jan 2013 17:05:08 -0500 Subject: Make smartcase locale-aware. --- background_scripts/completion.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 951d0756..fd41cdc8 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -356,7 +356,7 @@ RegexpCache = regexpString = prefix + regexpString if prefix regexpString = regexpString + suffix if suffix # Smartcase: Regexp is case insensitive, unless `string` contains a capital letter (testing `string`, not `regexpString`). - @cache[regexpString] ||= new RegExp regexpString, (if /[A-Z]/.test string then "" else "i") + @cache[regexpString] ||= new RegExp regexpString, (if Utils.hasUpperCase(string) then "" else "i") # Provides cached access to Chrome's history. As the user browses to new pages, we add those pages to this # history cache. -- cgit v1.2.3