Skip to content

🐛 Preserve HTML ordered-list types in Docutils - #1253

Open
Boulea7 wants to merge 1 commit into
executablebooks:masterfrom
Boulea7:fix/ordered-list-type
Open

Boulea7 wants to merge 1 commit into
executablebooks:masterfrom
Boulea7:fix/ordered-list-type

Conversation

@Boulea7

@Boulea7 Boulea7 commented Dec 2, 2026

Copy link
Copy Markdown

With attrs_block enabled, Sphinx and Docutils label Notice and Consent as 3 and 4.

{type=A}
3) Notice
4) Consent

The Markdown token already contains type="A". This change maps the HTML list types to Docutils’ enumeration styles, so the items are labeled C and D. An explicit, supported MyST style still takes precedence.

The eight regression cases cover all five HTML types, an unknown value, and combinations with style. I also checked the Sphinx HTML, Docutils HTML5, and LaTeX output with a non-default start. The repository’s pre-commit checks passed.

The example uses the released attrs_block plugin. The same attribute carries the numbering in the proposed fancy-list plugin. mdit-py-plugins#34

AI assisted with implementation and testing.

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