mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-04 20:40:07 +02:00
update packages to latest version
This commit is contained in:
34
node_modules/clean-css/lib/optimizer/level-2/optimize.js
generated
vendored
34
node_modules/clean-css/lib/optimizer/level-2/optimize.js
generated
vendored
@@ -21,18 +21,18 @@ function removeEmpty(tokens) {
|
||||
var isEmpty = false;
|
||||
|
||||
switch (token[0]) {
|
||||
case Token.RULE:
|
||||
isEmpty = token[1].length === 0 || token[2].length === 0;
|
||||
break;
|
||||
case Token.NESTED_BLOCK:
|
||||
removeEmpty(token[2]);
|
||||
isEmpty = token[2].length === 0;
|
||||
break;
|
||||
case Token.AT_RULE:
|
||||
isEmpty = token[1].length === 0;
|
||||
break;
|
||||
case Token.AT_RULE_BLOCK:
|
||||
isEmpty = token[2].length === 0;
|
||||
case Token.RULE:
|
||||
isEmpty = token[1].length === 0 || token[2].length === 0;
|
||||
break;
|
||||
case Token.NESTED_BLOCK:
|
||||
removeEmpty(token[2]);
|
||||
isEmpty = token[2].length === 0;
|
||||
break;
|
||||
case Token.AT_RULE:
|
||||
isEmpty = token[1].length === 0;
|
||||
break;
|
||||
case Token.AT_RULE_BLOCK:
|
||||
isEmpty = token[2].length === 0;
|
||||
}
|
||||
|
||||
if (isEmpty) {
|
||||
@@ -59,11 +59,11 @@ function recursivelyOptimizeProperties(tokens, context) {
|
||||
var token = tokens[i];
|
||||
|
||||
switch (token[0]) {
|
||||
case Token.RULE:
|
||||
optimizeProperties(token[2], true, true, context);
|
||||
break;
|
||||
case Token.NESTED_BLOCK:
|
||||
recursivelyOptimizeProperties(token[2], context);
|
||||
case Token.RULE:
|
||||
optimizeProperties(token[2], true, true, context);
|
||||
break;
|
||||
case Token.NESTED_BLOCK:
|
||||
recursivelyOptimizeProperties(token[2], context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user