@codemirror/language 6.11.3 → 6.12.1

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
+ ## 6.12.1 (2025-12-22)
2
+
3
+ ### Bug fixes
4
+
5
+ Improve finding inner language in syntax tree when the nested parse has been marked as bracketed.
6
+
1
7
  ## 6.11.3 (2025-08-15)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -146,7 +146,7 @@ Language.setState = state.StateEffect.define();
146
146
  function topNodeAt(state, pos, side) {
147
147
  let topLang = state.facet(language), tree = syntaxTree(state).topNode;
148
148
  if (!topLang || topLang.allowsNesting) {
149
- for (let node = tree; node; node = node.enter(pos, side, common.IterMode.ExcludeBuffers))
149
+ for (let node = tree; node; node = node.enter(pos, side, common.IterMode.ExcludeBuffers | common.IterMode.EnterBracketed))
150
150
  if (node.type.isTop)
151
151
  tree = node;
152
152
  }
@@ -1657,7 +1657,7 @@ const baseTheme$1 = view.EditorView.baseTheme({
1657
1657
  });
1658
1658
 
1659
1659
  /**
1660
- A highlight style associates CSS styles with higlighting
1660
+ A highlight style associates CSS styles with highlighting
1661
1661
  [tags](https://lezer.codemirror.net/docs/ref#highlight.Tag).
1662
1662
  */
1663
1663
  class HighlightStyle {
package/dist/index.d.cts CHANGED
@@ -828,7 +828,7 @@ to fold or unfold the line).
828
828
  declare function foldGutter(config?: FoldGutterConfig): Extension;
829
829
 
830
830
  /**
831
- A highlight style associates CSS styles with higlighting
831
+ A highlight style associates CSS styles with highlighting
832
832
  [tags](https://lezer.codemirror.net/docs/ref#highlight.Tag).
833
833
  */
834
834
  declare class HighlightStyle implements Highlighter {
package/dist/index.d.ts CHANGED
@@ -828,7 +828,7 @@ to fold or unfold the line).
828
828
  declare function foldGutter(config?: FoldGutterConfig): Extension;
829
829
 
830
830
  /**
831
- A highlight style associates CSS styles with higlighting
831
+ A highlight style associates CSS styles with highlighting
832
832
  [tags](https://lezer.codemirror.net/docs/ref#highlight.Tag).
833
833
  */
834
834
  declare class HighlightStyle implements Highlighter {
package/dist/index.js CHANGED
@@ -144,7 +144,7 @@ Language.setState = /*@__PURE__*/StateEffect.define();
144
144
  function topNodeAt(state, pos, side) {
145
145
  let topLang = state.facet(language), tree = syntaxTree(state).topNode;
146
146
  if (!topLang || topLang.allowsNesting) {
147
- for (let node = tree; node; node = node.enter(pos, side, IterMode.ExcludeBuffers))
147
+ for (let node = tree; node; node = node.enter(pos, side, IterMode.ExcludeBuffers | IterMode.EnterBracketed))
148
148
  if (node.type.isTop)
149
149
  tree = node;
150
150
  }
@@ -1655,7 +1655,7 @@ const baseTheme$1 = /*@__PURE__*/EditorView.baseTheme({
1655
1655
  });
1656
1656
 
1657
1657
  /**
1658
- A highlight style associates CSS styles with higlighting
1658
+ A highlight style associates CSS styles with highlighting
1659
1659
  [tags](https://lezer.codemirror.net/docs/ref#highlight.Tag).
1660
1660
  */
1661
1661
  class HighlightStyle {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/language",
3
- "version": "6.11.3",
3
+ "version": "6.12.1",
4
4
  "description": "Language support infrastructure for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@codemirror/state": "^6.0.0",
30
30
  "@codemirror/view": "^6.23.0",
31
- "@lezer/common": "^1.1.0",
31
+ "@lezer/common": "^1.5.0",
32
32
  "@lezer/highlight": "^1.0.0",
33
33
  "@lezer/lr": "^1.0.0",
34
34
  "style-mod": "^4.0.0"