mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Extend cross referencing options with values (#10883)
This change means that text following `=`, `[=`, or ` ` is ignored when searching for a corresponding option directive to an option cross reference role. These are commonly used options, for example `--profile=path`, `--profile[=path]` or `--profile path`. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
@@ -1803,7 +1803,8 @@ There is a set of directives allowing documenting command-line programs:
|
||||
|
||||
.. versionchanged:: 5.3
|
||||
|
||||
One can cross-reference including an option value: ``:option:`--module=foobar```.
|
||||
One can cross-reference including an option value: ``:option:`--module=foobar```,
|
||||
,``:option:`--module[=foobar]``` or ``:option:`--module foobar```.
|
||||
|
||||
Use :confval:`option_emphasise_placeholders` for parsing of
|
||||
"variable part" of a literal text (similarly to the :rst:role:`samp` role).
|
||||
|
||||
Reference in New Issue
Block a user