Skip to content

Handle ordered list start attributes without a value - #454

Open
xiehuanyi wants to merge 1 commit into
Alir3z4:masterfrom
xiehuanyi:fix-valueless-list-start
Open

xiehuanyi wants to merge 1 commit into
Alir3z4:masterfrom
xiehuanyi:fix-valueless-list-start

Conversation

@xiehuanyi

Copy link
Copy Markdown

Converting <ol start><li>First</li></ol> currently raises AssertionError, because HTMLParser represents the valueless start attribute as None.

Treat that value like an absent or invalid starting number and use the existing default numbering. Valid numeric values continue to select the requested starting number, and invalid strings keep their existing fallback.

Validation on Python 3.12.3: the bare-attribute regression fails against upstream; all 200 project tests pass with the fix. Added API coverage for bare, empty, invalid and valid start="3" attributes. Strict mypy, Black 25.1, flake8, isort and whitespace checks pass.

Prepared with AI assistance and independently reviewed before submission.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 12:28

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants