Skip to content

Commit c1943f1

Browse files
fix: document raw field preservation
1 parent b56eec1 commit c1943f1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/super-editor/src/editors/v1/core/super-converter/field-references/preProcessNodesForFldChar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ export const preProcessNodesForFldChar = (nodes = [], docx) => {
227227
// A field from this level or higher ended in the children.
228228
const shouldPreserveRaw = childResult.unpairedEndPreserveRaw || isTrackChangeWrapper(node);
229229
if (collectedNodesStack.length === 0) {
230+
// Preserve the original subtree; child processing may have stripped the fldChar end marker.
230231
processedNodes.push(rawNode);
231232
unpairedEnd = true;
232233
if (shouldPreserveRaw) unpairedEndPreserveRaw = true;

0 commit comments

Comments
 (0)