source: imaps-frontend/node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-prefix.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 512 bytes
Line 
1var startsAsUrl = require('./starts-as-url');
2
3var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;
4
5var URL_PREFIX_PATTERN = /^url\(/i;
6
7var plugin = {
8 level1: {
9 value: function urlPrefix(_name, value, options) {
10 if (!options.level[OptimizationLevel.One].normalizeUrls) {
11 return value;
12 }
13
14 if (!startsAsUrl(value)) {
15 return value;
16 }
17
18 return value.replace(URL_PREFIX_PATTERN, 'url(');
19 }
20 }
21};
22
23module.exports = plugin;
Note: See TracBrowser for help on using the repository browser.