docx-diff-editor 1.0.54 → 1.0.56
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 +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3278,7 +3278,8 @@ var DocxDiffEditor = forwardRef(
|
|
|
3278
3278
|
}
|
|
3279
3279
|
newJson = content;
|
|
3280
3280
|
}
|
|
3281
|
-
const
|
|
3281
|
+
const cleanNewJson = acceptAllChangesInJson(newJson) || { type: "doc", content: [] };
|
|
3282
|
+
const normalizedNewJson = normalizeRunProperties(cleanNewJson);
|
|
3282
3283
|
const structuralResult = mergeWithStructuralAwareness(
|
|
3283
3284
|
cleanBaseline,
|
|
3284
3285
|
normalizedNewJson,
|
|
@@ -3286,11 +3287,12 @@ var DocxDiffEditor = forwardRef(
|
|
|
3286
3287
|
);
|
|
3287
3288
|
const merged = structuralResult.mergedDoc;
|
|
3288
3289
|
const structInfos = structuralResult.structuralInfos;
|
|
3289
|
-
|
|
3290
|
-
|
|
3290
|
+
const normalizedMerged = normalizeRunProperties(merged);
|
|
3291
|
+
setMergedJson(normalizedMerged);
|
|
3292
|
+
const diff = diffDocuments(cleanBaseline, cleanNewJson);
|
|
3291
3293
|
setDiffResult(diff);
|
|
3292
3294
|
if (superdocRef.current?.activeEditor) {
|
|
3293
|
-
setEditorContent(superdocRef.current.activeEditor,
|
|
3295
|
+
setEditorContent(superdocRef.current.activeEditor, normalizedMerged);
|
|
3294
3296
|
enableReviewMode(superdocRef.current);
|
|
3295
3297
|
const sd = superdocRef.current;
|
|
3296
3298
|
if (sd.commentsStore?.processLoadedDocxComments) {
|