1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-04 12:40:05 +02:00

update packages to latest version

This commit is contained in:
s2
2022-08-20 18:51:33 +02:00
parent 09663a35a5
commit 806ebf9a57
4513 changed files with 366205 additions and 92512 deletions

View File

@@ -93,9 +93,12 @@ function hackFrom(property) {
match = [Hack.ASTERISK];
} else if (lastValue[1][0] == Match.BANG && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN)) {
match = [Hack.BANG];
} else if (lastValue[1].indexOf(Match.BANG) > 0 && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN) && Match.BANG_SUFFIX_PATTERN.test(lastValue[1])) {
} else if (lastValue[1].indexOf(Match.BANG) > 0
&& !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN)
&& Match.BANG_SUFFIX_PATTERN.test(lastValue[1])) {
match = [Hack.BANG];
} else if (lastValue[1].indexOf(Match.BACKSLASH) > 0 && lastValue[1].indexOf(Match.BACKSLASH) == lastValue[1].length - Match.BACKSLASH.length - 1) {
} else if (lastValue[1].indexOf(Match.BACKSLASH) > 0
&& lastValue[1].indexOf(Match.BACKSLASH) == lastValue[1].length - Match.BACKSLASH.length - 1) {
match = [Hack.BACKSLASH, lastValue[1].substring(lastValue[1].indexOf(Match.BACKSLASH) + 1)];
} else if (lastValue[1].indexOf(Match.BACKSLASH) === 0 && lastValue[1].length == 2) {
match = [Hack.BACKSLASH, lastValue[1].substring(1)];
@@ -105,13 +108,13 @@ function hackFrom(property) {
}
function isImportant(property) {
if (property.length < 3)
return false;
if (property.length < 3) { return false; }
var lastValue = property[property.length - 1];
if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {
return true;
} else if (Match.IMPORTANT_WORD_PATTERN.test(lastValue[1]) && Match.SUFFIX_BANG_PATTERN.test(property[property.length - 2][1])) {
} if (Match.IMPORTANT_WORD_PATTERN.test(lastValue[1])
&& Match.SUFFIX_BANG_PATTERN.test(property[property.length - 2][1])) {
return true;
}