aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex.js')
-rw-r--r--src/regex.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/regex.js b/src/regex.js
index 4c95cb4..4782bda 100644
--- a/src/regex.js
+++ b/src/regex.js
@@ -9,8 +9,8 @@ SVG.regex = {
// Parse rgb value
, rgb: /rgb\((\d+),(\d+),(\d+)\)/
- // Parse reference id
-, reference: /#([a-z0-9\-_]+)/i
+ // Parse reference url
+, reference: /(url\()?([-\w:/.]+)?#([-\w]+)/
// splits a transformation chain
, transforms: /\)\s*,?\s*/
@@ -39,9 +39,6 @@ SVG.regex = {
// Test for image url
, isImage: /\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i
- // Test for url reference
-, isUrl: /url\(([-\w:/]+(?:\.\w+)?)?#([-\w]+)\)/
-
// split at whitespace and comma
, delimiter: /[\s,]+/