@manuscripts/track-changes-plugin 1.8.1-LEAN-3978.0 → 1.8.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.
|
@@ -52,7 +52,7 @@ function trackTransaction(tr, oldState, newTr, authorID) {
|
|
|
52
52
|
}
|
|
53
53
|
const invertedStep = step.invert(tr.docs[i]);
|
|
54
54
|
const isDelete = step.from !== step.to && step.slice.content.size < invertedStep.slice.content.size;
|
|
55
|
-
const thisStepMapping = tr.mapping.slice(i + 1);
|
|
55
|
+
const thisStepMapping = tr.mapping.slice(i + 1, i + 1);
|
|
56
56
|
const newStep = new prosemirror_transform_1.ReplaceStep(thisStepMapping.map(invertedStep.from), thisStepMapping.map(invertedStep.to), invertedStep.slice);
|
|
57
57
|
const stepResult = newTr.maybeStep(isDelete ? invertedStep : newStep);
|
|
58
58
|
let [steps, startPos] = (0, trackReplaceStep_1.trackReplaceStep)(step, oldState, newTr, emptyAttrs, stepResult, tr.docs[i], tr);
|
|
@@ -46,7 +46,7 @@ export function trackTransaction(tr, oldState, newTr, authorID) {
|
|
|
46
46
|
}
|
|
47
47
|
const invertedStep = step.invert(tr.docs[i]);
|
|
48
48
|
const isDelete = step.from !== step.to && step.slice.content.size < invertedStep.slice.content.size;
|
|
49
|
-
const thisStepMapping = tr.mapping.slice(i + 1);
|
|
49
|
+
const thisStepMapping = tr.mapping.slice(i + 1, i + 1);
|
|
50
50
|
const newStep = new ReplaceStep(thisStepMapping.map(invertedStep.from), thisStepMapping.map(invertedStep.to), invertedStep.slice);
|
|
51
51
|
const stepResult = newTr.maybeStep(isDelete ? invertedStep : newStep);
|
|
52
52
|
let [steps, startPos] = trackReplaceStep(step, oldState, newTr, emptyAttrs, stepResult, tr.docs[i], tr);
|
package/package.json
CHANGED