fix(docx-core): replace duplicate rPrChange snapshots#459
Draft
stevenobiajulu wants to merge 1 commit into
Draft
fix(docx-core): replace duplicate rPrChange snapshots#459stevenobiajulu wants to merge 1 commit into
stevenobiajulu wants to merge 1 commit into
Conversation
Comparison can visit multiple format-changed atoms that belong to the same split run. Appending a fresh w:rPrChange each time violates CT_RPr, which admits at most one run-property revision child under a single w:rPr. This keeps the latest format snapshot by removing any existing w:rPrChange before appending the replacement. The regression locks the single-snapshot invariant and the emitted-schema known failure for #451 is removed. Fixes: #451
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
addFormatChangenow removes any existingw:rPrChangeunder the samew:rPrbefore appending the replacement snapshot. A regression test covers repeated format-change visits for one run, and the #451 emitted-schema known failure was removed.Why
The comparison pipeline can visit multiple format-changed atoms that came from the same split run. Appending a new
w:rPrChangeeach time creates invalidCT_RPrbecause only one run-property revision child is allowed in a singlew:rPr.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 #451 invariant.