@manuscripts/track-changes-plugin 1.9.0 → 1.9.1-LEAN-3837.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/dist/cjs/ChangeSet.js
CHANGED
|
@@ -91,7 +91,7 @@ class ChangeSet {
|
|
|
91
91
|
}
|
|
92
92
|
rootNodes.push([change]);
|
|
93
93
|
});
|
|
94
|
-
return rootNodes.filter((changes) => changes.filter((c) => c.dataTracked.operation !== change_1.CHANGE_OPERATION.reference));
|
|
94
|
+
return rootNodes.filter((changes) => changes.filter((c) => c.dataTracked.operation !== change_1.CHANGE_OPERATION.reference).length);
|
|
95
95
|
}
|
|
96
96
|
get pending() {
|
|
97
97
|
return this.changes.filter((c) => c.dataTracked.status === change_1.CHANGE_STATUS.pending);
|
|
@@ -49,7 +49,7 @@ function trackReplaceStep(step, oldState, newTr, attrs, stepResult, currentStepD
|
|
|
49
49
|
logger_1.log.info('DELETE STEPS: ', changeSteps);
|
|
50
50
|
function sameThingBackSpaced() {
|
|
51
51
|
if (changeSteps.length == 2 && newSliceContent.size > 0) {
|
|
52
|
-
const correspondingDeletion = changeSteps.find((step) => step.node.text === newSliceContent.content[0].text);
|
|
52
|
+
const correspondingDeletion = changeSteps.find((step) => step.type === 'delete-text' && step.node.text === newSliceContent.content[0].text);
|
|
53
53
|
return correspondingDeletion;
|
|
54
54
|
}
|
|
55
55
|
return undefined;
|
package/dist/es/ChangeSet.js
CHANGED
|
@@ -88,7 +88,7 @@ export class ChangeSet {
|
|
|
88
88
|
}
|
|
89
89
|
rootNodes.push([change]);
|
|
90
90
|
});
|
|
91
|
-
return rootNodes.filter((changes) => changes.filter((c) => c.dataTracked.operation !== CHANGE_OPERATION.reference));
|
|
91
|
+
return rootNodes.filter((changes) => changes.filter((c) => c.dataTracked.operation !== CHANGE_OPERATION.reference).length);
|
|
92
92
|
}
|
|
93
93
|
get pending() {
|
|
94
94
|
return this.changes.filter((c) => c.dataTracked.status === CHANGE_STATUS.pending);
|
|
@@ -23,7 +23,7 @@ export function trackReplaceStep(step, oldState, newTr, attrs, stepResult, curre
|
|
|
23
23
|
log.info('DELETE STEPS: ', changeSteps);
|
|
24
24
|
function sameThingBackSpaced() {
|
|
25
25
|
if (changeSteps.length == 2 && newSliceContent.size > 0) {
|
|
26
|
-
const correspondingDeletion = changeSteps.find((step) => step.node.text === newSliceContent.content[0].text);
|
|
26
|
+
const correspondingDeletion = changeSteps.find((step) => step.type === 'delete-text' && step.node.text === newSliceContent.content[0].text);
|
|
27
27
|
return correspondingDeletion;
|
|
28
28
|
}
|
|
29
29
|
return undefined;
|
package/package.json
CHANGED