feat: read text:list content in odp slide text frames into ContentParagraph.list - #58
Merged
Conversation
…/shared/list.ts The odt reader's list machinery -- the per-encounter numId counter, the ordered:/bullet: kind-prefix resolution, and the text:list/text:list-item structural walk -- moves verbatim into a shared module so the odp reader can reuse it against the identical text:list construct inside slide text boxes. readOdfListParagraphs attaches list membership itself, so readParagraphOrHeading loses its list parameter. No behaviour change.
…agraph.list
A draw:frame > draw:text-box carrying text:list content now reads through the
shared walker: nesting depth comes off the actual text:list-in-text:list-item
XML nesting, and numId is minted per top-level encounter from one
document-wide counter (threaded readOdp -> walkDrawShapes -> readDrawFrame ->
readDrawFrameContent), following the odt precedent. ODP text boxes carry
genuine structural list identity a consumer needs for grouping separate lists
apart, so the numId-less { level } shape schema 3.3.0 allows for level-only
sources (pptx's a:pPr/@lvl) would discard a real, source-grounded fact here.
The old deep text:p search is replaced by a direct-children walk over
draw:text-box's (text:p | text:list)* content model, preserving document
order.
Mearman
force-pushed
the
feat/odp-list-levels
branch
from
August 17, 2026 21:42
10cf9c7 to
ed6ac07
Compare
Contributor
|
🎉 This PR is included in version 3.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
The odp reader had no list handling at all: text:list content inside slide text frames (draw:frame > draw:text-box) was flattened by a deep text:p search, so nesting and membership information was lost. This reads it properly, mirroring the odt reader's own structural approach, per the odf.js item of ExaDev/document-schema.js#14.
/
elements, per-list outline nesting) must be able to tell two sibling lists apart -- unlike pptx's a:pPr/@lvl, which is a bare depth attribute with no list element behind it. Emitting { level } alone here would discard a real, source-grounded fact. The criterion is documented in readDrawFrameContent's comment.- The list walking (numId minting, kind resolution, item/nesting walk) is extracted from the odt reader into typed/shared/list.ts and reused rather than duplicated; odt behaviour is unchanged and its fixture tests still pass.
- Builds on document-schema.js ^3.3.0 (numId optional). The version bump itself landed on main via the sibling-released automation while this PR's CI ran, so this branch rebases on top of it rather than carrying its own bump commit.
Tests: nested text:list yields incrementing levels under one numId; sibling lists in one text box and lists in separate frames get distinct identities; paragraphs outside lists carry no list; the kind prefix resolves from text:list-style and unstyled lists stay unprefixed.
Generated by Claude Code