@@ -9,6 +9,9 @@ var SyntaxValidationResult;
9
9
SyntaxValidationResult[SyntaxValidationResult["Drop"] = 1] = "Drop";
10
10
SyntaxValidationResult[SyntaxValidationResult["Lenient"] = 2] = "Lenient"; /* preserve unknown at-rules, declarations and pseudo-classes */
11
11
})(SyntaxValidationResult || (SyntaxValidationResult = {}));
12
+ /**
13
+ * validation level enum
14
+ */
12
15
exports.ValidationLevel = void 0;
13
16
(function (ValidationLevel) {
14
17
ValidationLevel[ValidationLevel["None"] = 0] = "None";
@@ -13349,7 +13352,7 @@ function validateKeyframeBlockList(tokens, atRule, options) {
13349
13352
13350
13353
const matchUrl = /^(https?:)?\/\//;
13351
13354
/**
13352
- * return dirname
13355
+ * return the directory name of a path
13353
13356
* @param path
13354
13357
*/
13355
13358
function dirname(path) {
@@ -17244,7 +17247,7 @@ function parseSelector(tokens) {
17244
17247
// return doParse(`.x{${src}`, options).then((result: ParseResult) => <AstDeclaration[]>(<AstRule>result.ast.chi[0]).chi.filter(t => t.typ == EnumToken.DeclarationNodeType));
17245
17248
// }
17246
17249
/**
17247
- * parse string
17250
+ * parse css string
17248
17251
* @param src
17249
17252
* @param options
17250
17253
*/
@@ -17426,7 +17429,7 @@ function getTokenType(val, hint) {
17426
17429
};
17427
17430
}
17428
17431
/**
17429
- * parse token list
17432
+ * parse token array into a tree structure
17430
17433
* @param tokens
17431
17434
* @param options
17432
17435
*/
@@ -17828,7 +17831,7 @@ function* walk(node, filter) {
17828
17831
}
17829
17832
}
17830
17833
/**
17831
- * walk ast values
17834
+ * walk ast node value tokens
17832
17835
* @param values
17833
17836
* @param root
17834
17837
* @param filter
@@ -18308,7 +18311,7 @@ class ComputePrefixFeature {
18308
18311
}
18309
18312
let hasPrefix = false;
18310
18313
for (const { value } of walkValues(node.val)) {
18311
- if ((value.typ == exports.EnumToken.IdenTokenType || funcLike.includes(value.typ)) && value.val.match(/^-([^-]+)-(.+)$/) != null) {
18314
+ if ((value.typ == exports.EnumToken.IdenTokenType || (value.typ != exports.EnumToken.ParensTokenType && funcLike.includes(value.typ) )) && value.val.match(/^-([^-]+)-(.+)$/) != null) {
18312
18315
if (value.val.endsWith('-gradient')) {
18313
18316
// not supported yet
18314
18317
break;
0 commit comments