Skip to content

Preserve spacing between adjacent option labels - #460

Open
momooo15 wants to merge 1 commit into
Alir3z4:masterfrom
momooo15:codex/preserve-option-label-spacing
Open

momooo15 wants to merge 1 commit into
Alir3z4:masterfrom
momooo15:codex/preserve-option-label-spacing

Conversation

@momooo15

Copy link
Copy Markdown

Fixes #377.

Adjacent labels such as <option>abc</option><option>def</option> now produce abc def instead of abcdef. Defer the separator until the next output fragment so existing whitespace, nonbreaking spaces, and Markdown emphasis delimiters do not create duplicate spaces. Omitted option end tags are supported; code/preformatted content and tag callback overrides retain their behavior.

Add focused regressions and an API/CLI fixture, plus the required changelog and contributor entries. One formatting-only adjustment in config.py is required by the current Black version; its AST is unchanged.

Validation on Python 3.12/macOS:

  • 239 project tests passed, including 40 focused option-spacing cases.
  • Nine option-boundary regressions fail against unchanged upstream. Separate regression checks catch the earlier draft's extra space before em, i, and u.
  • tox -e py312,black,flake8,isort,mypy,pre-commit and git diff --check passed.
  • Independent agent review passed, with 30 additional boundary assertions, 196 non-option comparisons, and converter-reuse checks.

Three existing pytest deprecation warnings remain. Black warns about the configured Python 3.13 target on the local Python 3.12 runtime; current mypy warns that the repository's Python 3.9 target is no longer supported. Other Python versions and hosted CI have not yet been verified.

Prepared with AI assistance (Codex), including a separate agent review.

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.

Cannot provide space between content of <option> tag in <select>

1 participant