docx-diff-editor 1.0.54 → 1.0.55
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/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3286,7 +3286,8 @@ var DocxDiffEditor = react.forwardRef(
|
|
|
3286
3286
|
}
|
|
3287
3287
|
newJson = content;
|
|
3288
3288
|
}
|
|
3289
|
-
const
|
|
3289
|
+
const cleanNewJson = acceptAllChangesInJson(newJson) || { type: "doc", content: [] };
|
|
3290
|
+
const normalizedNewJson = normalizeRunProperties(cleanNewJson);
|
|
3290
3291
|
const structuralResult = mergeWithStructuralAwareness(
|
|
3291
3292
|
cleanBaseline,
|
|
3292
3293
|
normalizedNewJson,
|
|
@@ -3295,7 +3296,7 @@ var DocxDiffEditor = react.forwardRef(
|
|
|
3295
3296
|
const merged = structuralResult.mergedDoc;
|
|
3296
3297
|
const structInfos = structuralResult.structuralInfos;
|
|
3297
3298
|
setMergedJson(merged);
|
|
3298
|
-
const diff = diffDocuments(cleanBaseline,
|
|
3299
|
+
const diff = diffDocuments(cleanBaseline, cleanNewJson);
|
|
3299
3300
|
setDiffResult(diff);
|
|
3300
3301
|
if (superdocRef.current?.activeEditor) {
|
|
3301
3302
|
setEditorContent(superdocRef.current.activeEditor, merged);
|