Skip to content

fix(session): support formatted insertion in leading-tab runs - #803

Merged
JSv4 merged 1 commit into
mainfrom
fix/802-leading-tab-insertion
Sep 16, 2026
Merged

JSv4 merged 1 commit into
mainfrom
fix/802-leading-tab-insertion

Conversation

@JSv4

@JSv4 JSv4 commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Styled typing inside a run beginning with a tab returned offset_out_of_range, including the NVCA footnote at native offset 24. Allow the existing splitter to accept leading tabs followed only by text, keeping tabs before the retained prefix and applying typing formatting only to the inserted text.

The change retains the lightweight transaction path, failure rollback, and single-step undo/redo. Fields, inline containers, surrogate-pair boundaries, and other mixed run content remain guarded. Regression coverage extends the existing theories and exercises the exact NVCA footnote through both .NET and the public npm API. Documentation and changelog are updated.

Validation:

  • Five new insertion/rollback cases failed before the fix.
  • 1,267 DocxSession tests passed (dotnet test Docxodus.Tests/Docxodus.Tests.csproj --filter FullyQualifiedName~DocxSession).
  • All 8 Chromium tests in npm/tests/atomic-batch.spec.ts passed against a fresh full WASM build.
  • npm run build, npm run typecheck, and git diff --check passed.
  • GPT-6 Astra adversarial review completed with no remaining findings.

Closes #802.

@JSv4
JSv4 merged commit 58976ca into main Sep 16, 2026
14 checks passed
@JSv4
JSv4 deleted the fix/802-leading-tab-insertion branch September 16, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support atomic formatted insertion in text runs with a leading tab (12.6.1 NVCA footnotes)

1 participant