fix: keep bare numbered levels as ordered markers - #184
Open
chriscoveries wants to merge 1 commit into
Open
chriscoveries wants to merge 1 commit into
chriscoveries wants to merge 1 commit into
Conversation
Bare OOXML level patterns such as `%1` carry the item's ordinal but no marker punctuation. Treating that rendered text as a composite label forced Markdown output into `- 1`, losing ordered-list semantics even though GFM can represent the list item itself. Treat a bare ordinal pattern as reproducible by the native marker. This keeps decimal and alphabetic/roman ordinals in ordered lists while still using literal labels for composite patterns such as `%1-%2)`. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.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.
Summary
lvlText="%n"ordinal as reproducible by the list item's native Markdown marker.- 1serialization for decimal, alphabetic, and roman ordered levels.1, 2 -> interruption -> 9throughstartOverride, plus a snapshot.Reproduction
Before this change, a DOCX level defined as
numFmt="decimal"+lvlText="%1"rendered as:With this change it renders as:
The distinction matters for legal/court exports that use Word auto-numbering with bare ordinals; the previous output preserved the values but encoded them as bullet text rather than Markdown ordered-list items.
Test plan
cargo fmt --checkcargo test -p anydochandmade-lists.odtsnapshot.Summary by cubic
Fixes rendering of DOCX/ODT list levels that use a bare ordinal pattern (
lvlText="%1") so they emit Markdown ordered markers (1.) instead of bullet text (- 1). Restarted and non-decimal ordinals are preserved. Adds a DOCX fixture covering an interrupted restart and updates the ODT bare-number snapshot.Written for commit 32dc831. Summary will update on new commits.