Skip to content

std domain: parse conjoined option placeholders#14415

Open
lawrence3699 wants to merge 2 commits intosphinx-doc:masterfrom
lawrence3699:fix/conjoined-option-placeholders
Open

std domain: parse conjoined option placeholders#14415
lawrence3699 wants to merge 2 commits intosphinx-doc:masterfrom
lawrence3699:fix/conjoined-option-placeholders

Conversation

@lawrence3699
Copy link
Copy Markdown

Purpose

Fix std-domain option parsing for conjoined angle-bracket placeholders such as -S<value>.

Previously, the parser treated the whole string as the option name, so the directive registered -S<value> instead of -S. This keeps the placeholder in the argument portion, and extends :option: resolution so references like -S<other> resolve through the registered option stem.

Validation:

  • .venv/bin/python -m pytest tests/test_domains/test_domain_std.py -q
  • .venv/bin/python -m pytest tests/test_directives/test_directive_option.py tests/test_domains/test_domain_std.py -q
  • .venv/bin/ruff check sphinx/domains/std/__init__.py tests/test_domains/test_domain_std.py
  • .venv/bin/ruff format --check sphinx/domains/std/__init__.py tests/test_domains/test_domain_std.py

References

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.

Option directive (std domain) does not recognize options with conjoined values

1 participant