Skip to content

fix(docx-core): reuse paragraph mark insertion revisions#460

Draft
stevenobiajulu wants to merge 1 commit into
mainfrom
452-dedupe-paragraph-mark-ins-20260611
Draft

fix(docx-core): reuse paragraph mark insertion revisions#460
stevenobiajulu wants to merge 1 commit into
mainfrom
452-dedupe-paragraph-mark-ins-20260611

Conversation

@stevenobiajulu

Copy link
Copy Markdown
Member

What changed

Paragraph-mark insertion now searches the whole w:pPr for an existing w:ins marker 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:ins could be bypassed by the whole-paragraph marker pass, producing two insertion markers in one paragraph-mark property set. That violates CT_ParaRPr and can leave one marker outside the fixed revision context.

Validation

  • npm exec vitest -- packages/docx-core/src/baselines/atomizer/inPlaceModifier.test.ts --run
  • npm run check:conformance-citations
  • npm run build -w @usejunior/docx-core

Note: 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.

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
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
site Ready Ready Preview, Comment Jun 11, 2026 11:09pm

Request Review

@github-actions github-actions Bot added the fix label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant