@lezer/css 1.1.7 → 1.1.8

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.1.8 (2024-02-19)
2
+
3
+ ### Bug fixes
4
+
5
+ Follow the standard, allowing digits in unit identifiers.
6
+
1
7
  ## 1.1.7 (2024-01-08)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -58,7 +58,7 @@ const unitToken = new lr.ExternalTokenizer(input => {
58
58
  let {next} = input;
59
59
  if (next == percent) { input.advance(); input.acceptToken(Unit); }
60
60
  if (isAlpha(next)) {
61
- do { input.advance(); } while (isAlpha(input.next))
61
+ do { input.advance(); } while (isAlpha(input.next) || isDigit(input.next))
62
62
  input.acceptToken(Unit);
63
63
  }
64
64
  }
package/dist/index.js CHANGED
@@ -54,7 +54,7 @@ const unitToken = new ExternalTokenizer(input => {
54
54
  let {next} = input;
55
55
  if (next == percent) { input.advance(); input.acceptToken(Unit); }
56
56
  if (isAlpha(next)) {
57
- do { input.advance(); } while (isAlpha(input.next))
57
+ do { input.advance(); } while (isAlpha(input.next) || isDigit(input.next))
58
58
  input.acceptToken(Unit);
59
59
  }
60
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lezer/css",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "lezer-based CSS grammar",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",
package/src/.tern-port ADDED
@@ -0,0 +1 @@
1
+ 43121
@@ -10,12 +10,14 @@ export const
10
10
  RuleSet = 5,
11
11
  UniversalSelector = 6,
12
12
  NestingSelector = 9,
13
+ PseudoClassName = 16,
13
14
  ColorLiteral = 22,
14
15
  NumberLiteral = 23,
15
16
  StringLiteral = 24,
16
17
  BinOp = 26,
17
18
  CallExpression = 27,
18
19
  CallLiteral = 29,
20
+ CallTag = 30,
19
21
  ParenthesizedContent = 31,
20
22
  MatchOp = 44,
21
23
  ChildOp = 46,
@@ -25,13 +27,21 @@ export const
25
27
  Important = 55,
26
28
  ImportStatement = 57,
27
29
  AtKeyword = 58,
30
+ _import = 59,
28
31
  LogicOp = 64,
32
+ UnaryQueryOp = 66,
33
+ selector = 69,
29
34
  MediaStatement = 70,
35
+ media = 71,
30
36
  CharsetStatement = 72,
37
+ charset = 73,
31
38
  NamespaceStatement = 74,
39
+ namespace = 75,
32
40
  KeyframesStatement = 77,
41
+ keyframes = 78,
33
42
  KeyframeList = 80,
34
43
  KeyframeSelector = 81,
35
44
  SupportsStatement = 83,
45
+ supports = 84,
36
46
  AtRule = 85,
37
47
  Styles = 86
package/src/tokens.js CHANGED
@@ -47,7 +47,7 @@ export const unitToken = new ExternalTokenizer(input => {
47
47
  let {next} = input
48
48
  if (next == percent) { input.advance(); input.acceptToken(Unit) }
49
49
  if (isAlpha(next)) {
50
- do { input.advance() } while (isAlpha(input.next))
50
+ do { input.advance() } while (isAlpha(input.next) || isDigit(input.next))
51
51
  input.acceptToken(Unit)
52
52
  }
53
53
  }