Handle quoted strings in data url (#84)

* handle quoted strings in data url

* unrefactor

* update package json

* Revert "update package json"

This reverts commit 9446109b0f94d9e569a961642f1e57b1a67793ee.

* change background-image to border-image
This commit is contained in:
AssafKr
2021-07-11 11:47:58 +03:00
committed by GitHub
parent 583db22016
commit 10eead6d42
4 changed files with 12 additions and 3 deletions

View File

@@ -69,7 +69,7 @@ function extractOrigin(url: string): string {
return origin;
}
const URL_IN_CSS_REF = /url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm;
const URL_IN_CSS_REF = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm;
const RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/;
const DATA_URI = /^(data:)([^,]*),(.*)/i;
export function absoluteToStylesheet(