docblocks-core 0.2.0 → 0.2.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 +13 -0
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# docblocks-core
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c0559db: The mark commands stand the Y.Text format's length contract: `setMark`
|
|
8
|
+
(the exclusive path) and `unsetMark` passed the range's end offset as
|
|
9
|
+
the format's length argument (the Yjs `format(start, length)` signature).
|
|
10
|
+
Over a range whose `from + to` exceeds the text's length the command
|
|
11
|
+
extended the block's text with line breaks (the overhang's characters
|
|
12
|
+
got the mark or the drop) — the ghost empty lines over the mark's
|
|
13
|
+
toggle. The mark now stands the exact `[from, to)` bounds (the length is
|
|
14
|
+
`to - from`); the text is byte-stable over the toggle.
|
|
15
|
+
|
|
3
16
|
## 0.2.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/index.mjs
CHANGED
|
@@ -4465,7 +4465,7 @@ function setMark(ydoc, blockId, from, to, mark) {
|
|
|
4465
4465
|
if (exclusive) {
|
|
4466
4466
|
const clear = {};
|
|
4467
4467
|
for (const other of MARK_NAMES) if (other !== name) clear[other] = null;
|
|
4468
|
-
content.format(from, to, {
|
|
4468
|
+
content.format(from, to - from, {
|
|
4469
4469
|
...clear,
|
|
4470
4470
|
[name]: value
|
|
4471
4471
|
});
|
|
@@ -4480,7 +4480,7 @@ function unsetMark(ydoc, blockId, from, to, name) {
|
|
|
4480
4480
|
if (!Number.isInteger(from) || !Number.isInteger(to) || from < 0 || from > to || to > total) throw new InvalidRangeError(`Range must satisfy 0 <= from < to <= ${total} (got from=${from}, to=${to}).`);
|
|
4481
4481
|
if (from === to) return;
|
|
4482
4482
|
localTransact(ydoc, () => {
|
|
4483
|
-
content.format(from, to, { [name]: null });
|
|
4483
|
+
content.format(from, to - from, { [name]: null });
|
|
4484
4484
|
});
|
|
4485
4485
|
}
|
|
4486
4486
|
//#endregion
|
package/package.json
CHANGED