From 7dc453b58bbf71314e04b0f39a9dea756cb472c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 6 Nov 2012 10:52:03 -0800 Subject: [PATCH] No need to escape ) inside [] in regular expressions. --- src/svg/SvgImporter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/svg/SvgImporter.js b/src/svg/SvgImporter.js index 4dec73ad..b8b3fd0a 100644 --- a/src/svg/SvgImporter.js +++ b/src/svg/SvgImporter.js @@ -183,8 +183,8 @@ var SvgImporter = this.SvgImporter = new function() { var definitions = {}; function getDefinition(value) { - var matches = value.match(/#([^\)']+)/); - return definitions[matches ? matches[1] : value]; + var match = value.match(/#([^)']+)/); + return definitions[match ? match[1] : value]; } var importers = {