Skip to content

fix(docx-core): preserve live section and mark properties when rejecting pPrChange #984

Description

@stevenobiajulu

Independent dynamic Opus 5 review of PR #980 head25ff4870 found a pre-existing native Reject discrepancy: rejecting pPrChange replaces all of pPr with its CT_PPrBase snapshot, losing live paragraph-mark rPr and sectPr. Comparison AST retains those non-base children correctly.

Reviewer control requires no paragraph merge or mark revision: one paragraph with pPrChange (old jc=both), live rPr/color=FF0000 and sectPr/pgSz. Native rejectChanges yields only jc=both; rejectAllChanges retains the mark color and section. The affected native PhaseF restoration is untouched by PR #980 (current reject_changes.ts around637).

  • Reproduce independently on main with a schema-valid synthetic standalone paragraph.
  • Preserve live non-CT_PPrBase children during property snapshot restoration; test section topology and mark formatting separately.
  • Cover selected and foreign-author property revisions, empty snapshots, and adjacent sections.
  • Require native/AST parity, XSD validation and full gates before shipping a repair.

Prioritize section-topology loss above cosmetic empty-rPr cleanup#982. No fix included in PR#980. Word behavior remains unverified; public/synthetic inputs only.

Ref: #941, PR #980 review N1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions