Skip to content

restart at 1 ordered-lists numbering after every list content break - #225

Open
lehors wants to merge 2 commits into
doclang-project:mainfrom
lehors:issue-224
Open

lehors wants to merge 2 commits into
doclang-project:mainfrom
lehors:issue-224

Conversation

@lehors

@lehors lehors commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

This closes issue #224.

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
@lehors lehors mentioned this pull request Oct 30, 2026
4 of 6 tasks

@vagenas vagenas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lehors thanks for the proposal. A couple of points on this:

  • apparently only headings restart the numbering, so two separate numbered lists in the same section would still number as one; we'd best employ a more general rule
  • this seems to rely on python-docx internals (numbering_definitions._numbering); we should best stick to public APIs

…ntent breaks them

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
@lehors

lehors commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@vagenas this new version restarts ordered lists at 1 whenever something other than list content breaks them. I also dropped the numbering_definitions._numbering call in favor of public APIs.

@lehors lehors changed the title restart at 1 ordered-list numbering after every heading restart at 1 ordered-lists numbering after every list content break Oct 30, 2026
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.

2 participants