Skip to content

fix(odt): restart a continued sublist when its parent item advances - #215

Open
Aschenbath wants to merge 4 commits into
firecrawl:mainfrom
Aschenbath:odt-sublist-restart
Open

Aschenbath wants to merge 4 commits into
firecrawl:mainfrom
Aschenbath:odt-sublist-restart

Conversation

@Aschenbath

@Aschenbath Aschenbath commented Oct 31, 2026 •

Copy link
Copy Markdown

Fixes part 1 of #203 (nested ODT list numbering). Part 2 (annotations inlined into text) is covered by #206.

Problem

Word saves a nested list as ODT with text:continue-numbering="true" on every text:list. parse_list keeps one continuation counter per (style, depth). Item 2's sublist therefore resumed after item 1's sublist: 2.1. Payment rendered as 2.3. Payment. In ODF, LibreOffice and Word, a level restarts when a higher level advances.

Change

When an item at depth d takes a number, the continuation counters of the same list style at depths below d are cleared. A sublist under the new item then starts at its own start value. Continuation still works between sibling sublists inside one item and between top-level lists.

Verification

🤖 Generated with Claude Code


Summary by cubic

Fixes part 1 of #203: a continued sublist under an item now restarts numbering when its parent item advances, matching ODF and LibreOffice behavior. Previously, text:continue-numbering on every level made item 2's sublist carry over item 1's sublist counter, so its first child read 2.3 instead of 2.1.

Written for commit b96404a. Summary will update on new commits.

View guided diff

Word saves nested lists as ODT with text:continue-numbering on every
level, and the level-2 counter carried over from the previous parent's
sublist, so item 2's first child read 2.3 instead of 2.1. A new item now
clears the counters of the levels below it, as ODF and LibreOffice do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread src/formats/odf/text.rs Resolved
Aschenbath and others added 2 commits October 31, 2026 17:48
…ances

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread src/formats/odf/mod.rs Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant