@eslint/css-tree 3.6.2 → 3.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/lexer/match.cjs +1 -1
- package/cjs/syntax/atrule/media.cjs +2 -2
- package/cjs/syntax/node/Atrule.cjs +3 -3
- package/cjs/syntax/node/Block.cjs +8 -2
- package/data/patch.json +6 -14
- package/dist/csstree.esm.js +6 -6
- package/dist/csstree.js +6 -6
- package/dist/data.cjs +16 -14
- package/dist/data.js +16 -14
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/lib/lexer/match.js +1 -1
- package/lib/syntax/atrule/media.js +2 -2
- package/lib/syntax/node/Atrule.js +3 -3
- package/lib/syntax/node/Block.js +8 -2
- package/package.json +2 -2
package/cjs/lexer/match.cjs
CHANGED
|
@@ -13,7 +13,7 @@ const EXIT_REASON_MATCH = 'Match';
|
|
|
13
13
|
const EXIT_REASON_MISMATCH = 'Mismatch';
|
|
14
14
|
const EXIT_REASON_ITERATION_LIMIT = 'Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)';
|
|
15
15
|
|
|
16
|
-
const ITERATION_LIMIT =
|
|
16
|
+
const ITERATION_LIMIT = 150000;
|
|
17
17
|
|
|
18
18
|
function reverseList(list) {
|
|
19
19
|
let prev = null;
|
|
@@ -30,7 +30,7 @@ const structure = {
|
|
|
30
30
|
block: ['Block', null]
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
function parse(isDeclaration = false) {
|
|
33
|
+
function parse(isDeclaration = false, { allowNestedRules = false } = {}) {
|
|
34
34
|
const start = this.tokenStart;
|
|
35
35
|
let name;
|
|
36
36
|
let nameLowerCase;
|
|
@@ -64,10 +64,10 @@ function parse(isDeclaration = false) {
|
|
|
64
64
|
case types.LeftCurlyBracket:
|
|
65
65
|
if (hasOwnProperty.call(this.atrule, nameLowerCase) &&
|
|
66
66
|
typeof this.atrule[nameLowerCase].block === 'function') {
|
|
67
|
-
block = this.atrule[nameLowerCase].block.call(this, isDeclaration);
|
|
67
|
+
block = this.atrule[nameLowerCase].block.call(this, isDeclaration, { allowNestedRules });
|
|
68
68
|
} else {
|
|
69
69
|
// TODO: should consume block content as Raw?
|
|
70
|
-
block = this.Block(isDeclarationBlockAtrule.call(this));
|
|
70
|
+
block = this.Block(isDeclaration || isDeclarationBlockAtrule.call(this), { allowNestedRules });
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
break;
|
|
@@ -5,11 +5,17 @@ const types = require('../../tokenizer/types.cjs');
|
|
|
5
5
|
const AMPERSAND = 0x0026; // U+0026 AMPERSAND (&)
|
|
6
6
|
const DOT = 0x002E; // U+002E FULL STOP (.)
|
|
7
7
|
const STAR = 0x002A; // U+002A ASTERISK (*);
|
|
8
|
+
const PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)
|
|
9
|
+
const GREATERTHANSIGN = 0x003E; // U+003E GREATER-THAN SIGN (>)
|
|
10
|
+
const TILDE = 0x007E; // U+007E TILDE (~)
|
|
8
11
|
|
|
9
12
|
const selectorStarts = new Set([
|
|
10
13
|
AMPERSAND,
|
|
11
14
|
DOT,
|
|
12
|
-
STAR
|
|
15
|
+
STAR,
|
|
16
|
+
PLUSSIGN,
|
|
17
|
+
GREATERTHANSIGN,
|
|
18
|
+
TILDE
|
|
13
19
|
]);
|
|
14
20
|
|
|
15
21
|
function consumeRaw() {
|
|
@@ -83,7 +89,7 @@ function parse(isStyleBlock, { allowNestedRules = false } = {}) {
|
|
|
83
89
|
break;
|
|
84
90
|
|
|
85
91
|
case types.AtKeyword:
|
|
86
|
-
children.push(this.parseWithFallback(this.Atrule.bind(this, isStyleBlock), consumeRaw));
|
|
92
|
+
children.push(this.parseWithFallback(this.Atrule.bind(this, isStyleBlock, { allowNestedRules }), consumeRaw));
|
|
87
93
|
break;
|
|
88
94
|
|
|
89
95
|
default:
|
package/data/patch.json
CHANGED
|
@@ -14,8 +14,12 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"font-features-values": {
|
|
18
|
+
"comment": "The features values syntax is defined in https://www.w3.org/TR/css-fonts-4/#at-ruledef-font-feature-values",
|
|
19
|
+
"prelude": "[<string> | <custom-ident>]+",
|
|
20
|
+
"descriptors": {
|
|
21
|
+
"font-display": "auto | block | swap | fallback | optional"
|
|
22
|
+
}
|
|
19
23
|
},
|
|
20
24
|
"scope": {
|
|
21
25
|
"prelude": "[ ( <scope-start> ) ]? [ to ( <scope-end> ) ]?"
|
|
@@ -811,18 +815,6 @@
|
|
|
811
815
|
"references": [
|
|
812
816
|
"https://drafts.csswg.org/css-anchor-position-1/#typedef-position-area"
|
|
813
817
|
]
|
|
814
|
-
},
|
|
815
|
-
"font-variant-css2": {
|
|
816
|
-
"syntax": "normal | small-caps",
|
|
817
|
-
"comment": "new definition on font-4, https://drafts.csswg.org/css-fonts-4/#font-variant-css21-values"
|
|
818
|
-
},
|
|
819
|
-
"font-width-css3": {
|
|
820
|
-
"syntax": "normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded",
|
|
821
|
-
"comment": "new definition on font-4, https://drafts.csswg.org/css-fonts-4/#font-width-css3-values"
|
|
822
|
-
},
|
|
823
|
-
"system-family-name": {
|
|
824
|
-
"syntax": "caption | icon | menu | message-box | small-caption | status-bar",
|
|
825
|
-
"comment": "new definition on font-4, https://drafts.csswg.org/css-fonts-4/#system-family-name-value"
|
|
826
818
|
}
|
|
827
819
|
}
|
|
828
820
|
}
|