Repository navigation
Conversation
RevisionProcessor.RejectRevisions inverts w:del/w:ins only when their nearest ancestor (skipping sdt and smartTag) is a w:p. Inside a w:hyperlink the revisions were left as they were, so the accept pass that follows dropped the deleted text and kept the inserted text: the opposite of Word's Reject All. Treat w:hyperlink as a transparent run container like w:sdt and w:smartTag.
This was referenced Oct 15, 2026
Contributor
Author
|
Folded into #554. All three fixes added a name to the same ancestor predicate in |
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.
RevisionProcessor.RejectRevisionskeeps the inserted text and drops the deleted text when the revisions sit inside aw:hyperlink, the opposite of Reject All. Accept is correct.Reproduction
Reject gives
Alpha delta gamma; Word givesAlpha beta gamma.Cause. Reject inverts
w:del/w:insand then accepts.ReverseRevisionsTransformonly inverts revisions whose nearest ancestor (skippingsdt,sdtContent,smartTag) isw:p, so inside a hyperlink nothing is inverted.Fix. Skip
w:hyperlinkas well, likesmartTag.Test.
RP053_RevisionsInsideHyperlink(accept and reject).Found while using
RevisionProcessorto check that Reject All of a tracked-change redline gives back the original document. Expected results are Microsoft Word for Mac 16.113's own Accept All / Reject All on the same markup. The regression test fails on current master and passes with the fix;./build.shpasses.This is one of six small, independent
RevisionProcessorfixes (#548, #549, #550, #551, #552, #553). Each adds its test afterRP001inRevisionProcessorTests.cs, so whichever merges second will need a trivial rebase there; I'll rebase the rest as they land.Prepared with an AI coding agent (Claude); I reviewed the change and ran the tests.