mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7770 from bubba/option-directive-square-brackets
Let option directive support args in the form of foo[=bar]
This commit is contained in:
commit
1b28f6f027
@ -43,7 +43,7 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
# RE for option descriptions
|
# RE for option descriptions
|
||||||
option_desc_re = re.compile(r'((?:/|--|-|\+)?[^\s=]+)(=?\s*.*)')
|
option_desc_re = re.compile(r'((?:/|--|-|\+)?[^\s=[]+)(=?\s*.*)')
|
||||||
# RE for grammar tokens
|
# RE for grammar tokens
|
||||||
token_re = re.compile(r'`(\w+)`', re.U)
|
token_re = re.compile(r'`(\w+)`', re.U)
|
||||||
|
|
||||||
|
@ -180,7 +180,9 @@ Others
|
|||||||
|
|
||||||
.. option:: arg
|
.. option:: arg
|
||||||
|
|
||||||
Link to :option:`perl +p`, :option:`--ObjC++`, :option:`--plugin.option`, :option:`create-auth-token` and :option:`arg`
|
.. option:: -j[=N]
|
||||||
|
|
||||||
|
Link to :option:`perl +p`, :option:`--ObjC++`, :option:`--plugin.option`, :option:`create-auth-token`, :option:`arg` and :option:`-j`
|
||||||
|
|
||||||
.. program:: hg
|
.. program:: hg
|
||||||
|
|
||||||
|
@ -331,6 +331,8 @@ def test_html4_output(app, status, warning):
|
|||||||
'create-auth-token'),
|
'create-auth-token'),
|
||||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span",
|
(".//a[@class='reference internal'][@href='#cmdoption-perl-arg-arg']/code/span",
|
||||||
'arg'),
|
'arg'),
|
||||||
|
(".//a[@class='reference internal'][@href='#cmdoption-perl-j']/code/span",
|
||||||
|
'-j'),
|
||||||
(".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span",
|
(".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span",
|
||||||
'hg'),
|
'hg'),
|
||||||
(".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span",
|
(".//a[@class='reference internal'][@href='#cmdoption-hg-arg-commit']/code/span",
|
||||||
|
Loading…
Reference in New Issue
Block a user