mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-05-22 02:31:16 -04:00
parent
cc1e58e243
commit
8967193bb9
1 changed files with 3 additions and 2 deletions
|
@ -532,8 +532,9 @@ new function() {
|
|||
var definitions = {};
|
||||
function getDefinition(value) {
|
||||
// When url() comes from a style property, '#'' seems to be missing on
|
||||
// WebKit, so let's make it optional here:
|
||||
var match = value && value.match(/\((?:#|)([^)']+)/);
|
||||
// WebKit. We also get variations of quotes or no quotes, single or
|
||||
// double, so handle it all with one regular expression:
|
||||
var match = value && value.match(/\((?:["'#]*)([^"')]+)/);
|
||||
return match && definitions[match[1]];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue