aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2014-12-14 06:46:26 +0000
committerStephen Blott2014-12-14 06:46:26 +0000
commitd69f17ce906e93c15775ce31273556613276b2e5 (patch)
treedaf3409d2eb7d286158042e734d5ad8f35a28fda
parentb5d0bc23d310f5dfead132086a5b223ef413d066 (diff)
downloadvimium-d69f17ce906e93c15775ce31273556613276b2e5.tar.bz2
Add comment to try/catch regexp.
-rw-r--r--background_scripts/exclusions.coffee1
1 files changed, 1 insertions, 0 deletions
diff --git a/background_scripts/exclusions.coffee b/background_scripts/exclusions.coffee
index cf7fbbb3..2b34238b 100644
--- a/background_scripts/exclusions.coffee
+++ b/background_scripts/exclusions.coffee
@@ -7,6 +7,7 @@ RegexpCache =
regexp
else
@cache[pattern] =
+ # We use try/catch to ensure that a broken regexp doesn't wholly cripple Vimium.
try
new RegExp("^" + pattern.replace(/\*/g, ".*") + "$")
catch