fix(docx-core): reuse paragraph mark insertion revisions#460
Draft
stevenobiajulu wants to merge 1 commit into
Draft
fix(docx-core): reuse paragraph mark insertion revisions#460stevenobiajulu wants to merge 1 commit into
stevenobiajulu wants to merge 1 commit 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
|
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.
What changed
Paragraph-mark insertion now searches the whole
w:pPrfor an existingw:insmarker before creating one. If a marker already exists, it is reused and normalized to the active comparison author/date while preserving its existing revision id.A regression test covers the bypass/fixed-date shape, and the #452 emitted-schema known failure was removed.
Why
A pre-existing paragraph-mark
w:inscould be bypassed by the whole-paragraph marker pass, producing two insertion markers in one paragraph-mark property set. That violatesCT_ParaRPrand can leave one marker outside the fixed revision context.Validation
npm exec vitest -- packages/docx-core/src/baselines/atomizer/inPlaceModifier.test.ts --runnpm run check:conformance-citationsnpm run build -w @usejunior/docx-coreNote: the full committed output corpus still contains unrelated pre-existing schema failures from other issue branches, so validation here is focused on the #452 invariant.