@manuscripts/track-changes-plugin 1.8.4 → 1.8.5-LEAN-4168.0
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.
|
@@ -127,7 +127,8 @@ function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema) {
|
|
|
127
127
|
d.status === change_1.CHANGE_STATUS.pending)) {
|
|
128
128
|
newDataTracked.push(newUpdate);
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
const finalDataTracked = newDataTracked.length > 0 ? newDataTracked : oldDataTracked;
|
|
131
|
+
newTr.setNodeMarkup(mapping.map(c.pos), undefined, Object.assign(Object.assign({}, c.newAttrs), { dataTracked: finalDataTracked.length > 0 ? finalDataTracked : null }), c.node.marks);
|
|
131
132
|
break;
|
|
132
133
|
default:
|
|
133
134
|
logger_1.log.error(`processChangeSteps: unknown change type`, c);
|
|
@@ -101,7 +101,8 @@ export function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema)
|
|
|
101
101
|
d.status === CHANGE_STATUS.pending)) {
|
|
102
102
|
newDataTracked.push(newUpdate);
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
const finalDataTracked = newDataTracked.length > 0 ? newDataTracked : oldDataTracked;
|
|
105
|
+
newTr.setNodeMarkup(mapping.map(c.pos), undefined, Object.assign(Object.assign({}, c.newAttrs), { dataTracked: finalDataTracked.length > 0 ? finalDataTracked : null }), c.node.marks);
|
|
105
106
|
break;
|
|
106
107
|
default:
|
|
107
108
|
log.error(`processChangeSteps: unknown change type`, c);
|
package/package.json
CHANGED