You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
selection.extractOoxml fails when nodeEdge endpoints span two paragraphs (SDK 2.27.0–2.31.0) #4162
Expected: A selection from before one paragraph to after the next extracts both paragraphs’ OOXML, as it does in @superdoc/sdk 2.26.0.
Actual: SDK 2.27.0, 2.28.0, 2.29.0, 2.30.0, and 2.31.0 throw COMMAND_FAILED on that selection. Using before and after on the same paragraph succeeds.
Create plain.docx with four ordinary body paragraphs containing Alpha one., Bravo two., Charlie three., and Delta four. in order. No edits or tracked changes are needed.
true false
COMMAND_FAILED Selection endpoint cannot be resolved to selected source content.
On 2.31.0, text endpoints from offset 0 in the second paragraph to offset 14 in the third extract both paragraphs. The node-edge failure also reproduces when those paragraphs contain pending tracked deletions, whether created with blocks.deleteRange or already present in the imported DOCX. Each deleted paragraph still extracts individually with its w:del markup.
This regression blocks us from upgrading past SDK 2.26, so a fix or a supported workaround for whole-paragraph ranges would be appreciated.
Hey @ohcedar ! Thanks for the callout and letting us know this is blocking your upgrade. I'm working on reproducing and will follow up with more details today.
Thanks for the clear repro, @ohcedar! We reproduced it.
2.27 moved the SDK to a new engine, and its extractOoxml only accepts node edges around a single paragraph or table. Ranges across paragraphs throw. 2.26 converted node edges to text offsets first, and the new engine doesn't.
first and last come from blocks.list({ includeText: true }). This also works with tracked deletions: deleted text still comes back with its w:del markup.
The fix is queued. We'll update here when it ships.
Activity
vivienne-sd commentedon Nov 23, 2026
Hey @ohcedar ! Thanks for the callout and letting us know this is blocking your upgrade. I'm working on reproducing and will follow up with more details today.
linear-code commentedon Nov 23, 2026
SD-8563
caio-pizzol commentedon Nov 24, 2026
Thanks for the clear repro, @ohcedar! We reproduced it.
2.27 moved the SDK to a new engine, and its
extractOoxmlonly accepts node edges around a single paragraph or table. Ranges across paragraphs throw. 2.26 converted node edges to text offsets first, and the new engine doesn't.Workaround: use text endpoints instead:
firstandlastcome fromblocks.list({ includeText: true }). This also works with tracked deletions: deleted text still comes back with itsw:delmarkup.The fix is queued. We'll update here when it ships.