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:
Martin Liška
2022-10-02 16:50:53 +02:00
committed by GitHub
parent 7765940f14
commit 0a91adb64d
4 changed files with 18 additions and 6 deletions

View File

@@ -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).