Repository navigation
fix(odt): restart a continued sublist when its parent item advances - #215
Open
Aschenbath wants to merge 4 commits into
Open
Aschenbath wants to merge 4 commits into
Aschenbath wants to merge 4 commits into
Conversation
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>
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
…ances Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
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 everytext:list.parse_listkeeps one continuation counter per (style, depth). Item 2's sublist therefore resumed after item 1's sublist:2.1. Paymentrendered as2.3. Payment. In ODF, LibreOffice and Word, a level restarts when a higher level advances.Change
When an item at depth
dtakes a number, the continuation counters of the same list style at depths belowdare 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
continued_sublist_restarts_when_its_parent_advancesinformats/odf/mod.rsuses the reproduction from ODT: nested list numbering continues across parents (2.1 renders as 2.3); annotations are inlined into the anchored word #203. It fails on main (2.3. Payment) and passes with the change.cargo test: all suites pass (lib 287 passed).rustfmt --checkon the changed files: clean.cargo clippy --all-targets -- -D warnings: my local toolchain (1.98) reports 7collapsible_iferrors inrtf/tables.rsandsheet/numfmt.rs. Main reports the same errors here, and none are in the changed files.🤖 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-numberingon every level made item 2's sublist carry over item 1's sublist counter, so its first child read2.3instead of2.1.mainand passes with the change.Written for commit b96404a. Summary will update on new commits.