@codemirror/view 0.19.36 → 0.19.37

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
+ ## 0.19.37 (2021-12-22)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix regression where plugin replacing decorations that span to the end of the line are ignored.
6
+
1
7
  ## 0.19.36 (2021-12-22)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -1581,7 +1581,7 @@ class ContentBuilder {
1581
1581
  return true;
1582
1582
  if (value.block)
1583
1583
  throw new RangeError("Block decorations may not be specified via plugins");
1584
- return to < this.doc.lineAt(this.pos).to;
1584
+ return to <= this.doc.lineAt(this.pos).to;
1585
1585
  }
1586
1586
  static build(text, from, to, decorations, pluginDecorationLength) {
1587
1587
  let builder = new ContentBuilder(text, from, to, pluginDecorationLength);
package/dist/index.js CHANGED
@@ -1577,7 +1577,7 @@ class ContentBuilder {
1577
1577
  return true;
1578
1578
  if (value.block)
1579
1579
  throw new RangeError("Block decorations may not be specified via plugins");
1580
- return to < this.doc.lineAt(this.pos).to;
1580
+ return to <= this.doc.lineAt(this.pos).to;
1581
1581
  }
1582
1582
  static build(text, from, to, decorations, pluginDecorationLength) {
1583
1583
  let builder = new ContentBuilder(text, from, to, pluginDecorationLength);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/view",
3
- "version": "0.19.36",
3
+ "version": "0.19.37",
4
4
  "description": "DOM view component for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",