@lezer/css 1.1.4 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.1.5 (2023-12-28)
2
+
3
+ ### Bug fixes
4
+
5
+ Tag comments and strings as isolating for the purpose of bidirectional text.
6
+
1
7
  ## 1.1.4 (2023-11-09)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -110,6 +110,7 @@ const parser = lr.LRParser.deserialize({
110
110
  nodeNames: "⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent , PseudoClassName ArgList IdSelector # IdName ] AttributeSelector [ AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",
111
111
  maxTerm: 114,
112
112
  nodeProps: [
113
+ ["isolate", -2,3,24,""],
113
114
  ["openedBy", 17,"(",48,"{"],
114
115
  ["closedBy", 18,")",49,"}"]
115
116
  ],
package/dist/index.js CHANGED
@@ -106,6 +106,7 @@ const parser = LRParser.deserialize({
106
106
  nodeNames: "⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent , PseudoClassName ArgList IdSelector # IdName ] AttributeSelector [ AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",
107
107
  maxTerm: 114,
108
108
  nodeProps: [
109
+ ["isolate", -2,3,24,""],
109
110
  ["openedBy", 17,"(",48,"{"],
110
111
  ["closedBy", 18,")",49,"}"]
111
112
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lezer/css",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "lezer-based CSS grammar",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",
@@ -19,6 +19,7 @@
19
19
  "@rollup/plugin-node-resolve": "^9.0.0"
20
20
  },
21
21
  "dependencies": {
22
+ "@lezer/common": "^1.2.0",
22
23
  "@lezer/lr": "^1.0.0",
23
24
  "@lezer/highlight": "^1.0.0"
24
25
  },
package/src/css.grammar CHANGED
@@ -132,7 +132,7 @@ CallExpression {
132
132
  }
133
133
 
134
134
  @skip {} {
135
- Comment { "/*" (commentContent | commentLineBreak)* commentEnd }
135
+ Comment[isolate] { "/*" (commentContent | commentLineBreak)* commentEnd }
136
136
  }
137
137
 
138
138
  @local tokens {
@@ -192,7 +192,7 @@ commaSep<value> { "" | value ("," value)* }
192
192
 
193
193
  @precedence { numberLiteralInner, BinOp, SiblingOp }
194
194
 
195
- StringLiteral { "\"" (!["\n\\] | "\\" _)* "\"" | "'" (!['\n\\] | "\\" _)* "'" }
195
+ StringLiteral[isolate] { "\"" (!["\n\\] | "\\" _)* "\"" | "'" (!['\n\\] | "\\" _)* "'" }
196
196
 
197
197
  "#"
198
198
 
package/src/parser.js CHANGED
@@ -13,6 +13,7 @@ export const parser = LRParser.deserialize({
13
13
  nodeNames: "⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent , PseudoClassName ArgList IdSelector # IdName ] AttributeSelector [ AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",
14
14
  maxTerm: 114,
15
15
  nodeProps: [
16
+ ["isolate", -2,3,24,""],
16
17
  ["openedBy", 17,"(",48,"{"],
17
18
  ["closedBy", 18,")",49,"}"]
18
19
  ],