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.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,
|
|
@@ -3294,11 +3295,12 @@ var DocxDiffEditor = react.forwardRef(
|
|
|
3294
3295
|
);
|
|
3295
3296
|
const merged = structuralResult.mergedDoc;
|
|
3296
3297
|
const structInfos = structuralResult.structuralInfos;
|
|
3297
|
-
|
|
3298
|
-
|
|
3298
|
+
const normalizedMerged = normalizeRunProperties(merged);
|
|
3299
|
+
setMergedJson(normalizedMerged);
|
|
3300
|
+
const diff = diffDocuments(cleanBaseline, cleanNewJson);
|
|
3299
3301
|
setDiffResult(diff);
|
|
3300
3302
|
if (superdocRef.current?.activeEditor) {
|
|
3301
|
-
setEditorContent(superdocRef.current.activeEditor,
|
|
3303
|
+
setEditorContent(superdocRef.current.activeEditor, normalizedMerged);
|
|
3302
3304
|
enableReviewMode(superdocRef.current);
|
|
3303
3305
|
const sd = superdocRef.current;
|
|
3304
3306
|
if (sd.commentsStore?.processLoadedDocxComments) {
|