fix(docx-core): normalize paragraph mark revision reuse#462
Closed
stevenobiajulu wants to merge 3 commits into
Closed
fix(docx-core): normalize paragraph mark revision reuse#462stevenobiajulu wants to merge 3 commits into
stevenobiajulu wants to merge 3 commits into
Conversation
Whole-paragraph insertion marking could add a second w:ins marker when another path had already placed a paragraph-mark insertion under the paragraph properties. That creates an invalid CT_ParaRPr shape and can also bypass the comparison revision context date and author. This searches the paragraph properties for an existing paragraph-mark marker before creating one, normalizes its author and date to the active context, and preserves the existing revision id when present. The regression covers the bypass shape and the #452 schema suppression is removed. Fixes: #452
…rder The reused paragraph-mark w:ins kept its legacy mid-sequence position, and a newly created w:del was always prepended even ahead of an existing w:ins, so the emitted-schema gate flagged w:ins after w:del/formatting children. CT_ParaRPr requires the tracked-change group (w:ins, w:del, w:moveFrom, w:moveTo) first and in that order. - addParagraphMarkRevisionMarker now routes both reused and new markers through placeParagraphMarkRevisionMarker: w:ins goes first in rPr, w:del goes right after an existing w:ins. - documentReconstructor.serializePPrWithParaRevisionMarker reuses a marker cloned from the source pPr instead of prepending a duplicate (the same issue #452 bug class on the reconstruction path), preserving the source revision's author/date/id.
Reuse paragraph-mark revision markers across cloned paragraph properties in both in-place and reconstructor paths so CT_ParaRPr ordering remains valid and duplicate insertion markers are not emitted. Adds regression coverage for reconstructor reuse/ordering and updates the canonical insertion regression to reflect normalized comparison metadata. Fixes: #452
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closed in favor of the clean follow-up PR #463.
This PR was opened from the reused #460 branch after #460 squash-merged, so its diff included already-merged pre-squash content. The replacement PR was created from current
mainand contains only the final follow-up commit.