mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
update node modules
This commit is contained in:
23
node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-prefix.js
generated
vendored
Normal file
23
node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-prefix.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
var startsAsUrl = require('./starts-as-url');
|
||||
|
||||
var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;
|
||||
|
||||
var URL_PREFIX_PATTERN = /^url\(/i;
|
||||
|
||||
var plugin = {
|
||||
level1: {
|
||||
value: function urlPrefix(_name, value, options) {
|
||||
if (!options.level[OptimizationLevel.One].normalizeUrls) {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (!startsAsUrl(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return value.replace(URL_PREFIX_PATTERN, 'url(');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = plugin;
|
Reference in New Issue
Block a user