@codemirror/lint
Advanced tools
+6
-0
@@ -0,1 +1,7 @@ | ||
| ## 6.9.2 (2025-11-03) | ||
| ### Bug fixes | ||
| Fix an infinite loop that would occur when a diagnostic pointed beyond the end of the document. | ||
| ## 6.9.1 (2025-10-23) | ||
@@ -2,0 +8,0 @@ |
+7
-2
@@ -27,3 +27,3 @@ 'use strict'; | ||
| let deco = new state.RangeSetBuilder(), active = [], pos = 0; | ||
| let scan = state$1.doc.iter(), scanPos = 0; | ||
| let scan = state$1.doc.iter(), scanPos = 0, docLen = state$1.doc.length; | ||
| for (let i = 0;;) { | ||
@@ -40,2 +40,4 @@ let next = i == sorted.length ? null : sorted[i]; | ||
| from = next.from; | ||
| if (from > docLen) | ||
| break; | ||
| to = next.to; | ||
@@ -57,4 +59,5 @@ active.push(next); | ||
| } | ||
| to = Math.min(to, docLen); | ||
| let widget = false; | ||
| if (active.some(d => d.from == from && d.to == to)) { | ||
| if (active.some(d => d.from == from && (d.to == to || to == docLen))) { | ||
| widget = from == to; | ||
@@ -96,2 +99,4 @@ if (!widget && to - from < 10) { | ||
| pos = to; | ||
| if (pos == docLen) | ||
| break; | ||
| for (let i = 0; i < active.length; i++) | ||
@@ -98,0 +103,0 @@ if (active[i].to <= pos) |
+7
-2
@@ -25,3 +25,3 @@ import { Decoration, showPanel, EditorView, ViewPlugin, gutter, showTooltip, hoverTooltip, getPanel, logException, WidgetType, GutterMarker } from '@codemirror/view'; | ||
| let deco = new RangeSetBuilder(), active = [], pos = 0; | ||
| let scan = state.doc.iter(), scanPos = 0; | ||
| let scan = state.doc.iter(), scanPos = 0, docLen = state.doc.length; | ||
| for (let i = 0;;) { | ||
@@ -38,2 +38,4 @@ let next = i == sorted.length ? null : sorted[i]; | ||
| from = next.from; | ||
| if (from > docLen) | ||
| break; | ||
| to = next.to; | ||
@@ -55,4 +57,5 @@ active.push(next); | ||
| } | ||
| to = Math.min(to, docLen); | ||
| let widget = false; | ||
| if (active.some(d => d.from == from && d.to == to)) { | ||
| if (active.some(d => d.from == from && (d.to == to || to == docLen))) { | ||
| widget = from == to; | ||
@@ -94,2 +97,4 @@ if (!widget && to - from < 10) { | ||
| pos = to; | ||
| if (pos == docLen) | ||
| break; | ||
| for (let i = 0; i < active.length; i++) | ||
@@ -96,0 +101,0 @@ if (active[i].to <= pos) |
+1
-1
| { | ||
| "name": "@codemirror/lint", | ||
| "version": "6.9.1", | ||
| "version": "6.9.2", | ||
| "description": "Linting support for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
95569
0.57%2071
0.49%