@manuscripts/track-changes-plugin 1.9.3-LEAN-4242.0 → 1.9.4

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.
@@ -14,7 +14,7 @@ function mergeNode(node, pos, tr) {
14
14
  const resPos = tr.doc.resolve(pos);
15
15
  const canMergeToNodeAbove = (resPos.parent !== tr.doc || resPos.nodeBefore) && ((_a = node.firstChild) === null || _a === void 0 ? void 0 : _a.isText);
16
16
  if (canMergeToNodeAbove) {
17
- return tr.replaceWith(pos - 1, pos + 1, prosemirror_model_1.Fragment.empty);
17
+ return tr.replaceWith(tr.mapping.map(pos), tr.mapping.map(pos + node.nodeSize), prosemirror_model_1.Fragment.empty);
18
18
  }
19
19
  return undefined;
20
20
  }
@@ -11,7 +11,7 @@ export function mergeNode(node, pos, tr) {
11
11
  const resPos = tr.doc.resolve(pos);
12
12
  const canMergeToNodeAbove = (resPos.parent !== tr.doc || resPos.nodeBefore) && ((_a = node.firstChild) === null || _a === void 0 ? void 0 : _a.isText);
13
13
  if (canMergeToNodeAbove) {
14
- return tr.replaceWith(pos - 1, pos + 1, Fragment.empty);
14
+ return tr.replaceWith(tr.mapping.map(pos), tr.mapping.map(pos + node.nodeSize), Fragment.empty);
15
15
  }
16
16
  return undefined;
17
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/track-changes-plugin",
3
- "version": "1.9.3-LEAN-4242.0",
3
+ "version": "1.9.4",
4
4
  "author": "Atypon Systems LLC",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/Atypon-OpenSource/manuscripts-track-changes-plugin",