mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 04:10:04 +02:00
update node modules
This commit is contained in:
20
node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-quotes.js
generated
vendored
Normal file
20
node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-quotes.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
var QUOTED_URL_PATTERN = /^url\(['"].+['"]\)$/;
|
||||
var QUOTED_URL_WITH_WHITESPACE_PATTERN = /^url\(['"].*[\*\s\(\)'"].*['"]\)$/;
|
||||
var QUOTES_PATTERN = /["']/g;
|
||||
var URL_DATA_PATTERN = /^url\(['"]data:[^;]+;charset/;
|
||||
|
||||
var plugin = {
|
||||
level1: {
|
||||
value: function urlQuotes(_name, value, options) {
|
||||
if (options.compatibility.properties.urlQuotes) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return QUOTED_URL_PATTERN.test(value) && !QUOTED_URL_WITH_WHITESPACE_PATTERN.test(value) && !URL_DATA_PATTERN.test(value) ?
|
||||
value.replace(QUOTES_PATTERN, '') :
|
||||
value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = plugin;
|
Reference in New Issue
Block a user