diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-04-23 15:19:05 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-04-23 15:19:05 +0200 |
commit | 86f29103acfd178da8a864a5ba34f8bea85d9d03 (patch) | |
tree | 61f72bb4c7852516e29718156605abd64d952bdd /src/regex.js | |
parent | 54362a872c75efa2f54be755a1a48ab87ab3e836 (diff) | |
download | svg.js-86f29103acfd178da8a864a5ba34f8bea85d9d03.tar.gz svg.js-86f29103acfd178da8a864a5ba34f8bea85d9d03.zip |
prefix all `url()` references with current location (#568)
the prefix is removed on export and added on import
Diffstat (limited to 'src/regex.js')
-rw-r--r-- | src/regex.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/regex.js b/src/regex.js index c0ca706..4c95cb4 100644 --- a/src/regex.js +++ b/src/regex.js @@ -39,6 +39,9 @@ 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,]+/ |