mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3366: option directive does not allow punctuations
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -26,6 +26,7 @@ Bugs fixed
|
||||
* #3394: When ``'pointsize'`` is not ``10pt``, Japanese ``'manual'`` document
|
||||
gets wrong PDF page dimensions
|
||||
* #3399: quickstart: conf.py was not overwritten by template
|
||||
* #3366: option directive does not allow punctuations
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
@@ -28,7 +28,7 @@ from sphinx.util.compat import Directive
|
||||
|
||||
|
||||
# RE for option descriptions
|
||||
option_desc_re = re.compile(r'((?:/|--|-|\+)?[-\.?@#_a-zA-Z0-9]+)(=?\s*.*)')
|
||||
option_desc_re = re.compile(r'((?:/|--|-|\+)?[-+\.?@#_a-zA-Z0-9]+)(=?\s*.*)')
|
||||
# RE for grammar tokens
|
||||
token_re = re.compile('`(\w+)`', re.U)
|
||||
|
||||
|
||||
@@ -172,13 +172,15 @@ Others
|
||||
|
||||
.. option:: +p
|
||||
|
||||
.. option:: --ObjC++
|
||||
|
||||
.. option:: --plugin.option
|
||||
|
||||
.. option:: create-auth-token
|
||||
|
||||
.. option:: arg
|
||||
|
||||
Link to :option:`perl +p`, :option:`--plugin.option`, :option:`create-auth-token` and :option:`arg`
|
||||
Link to :option:`perl +p`, :option:`--ObjC++`, :option:`--plugin.option`, :option:`create-auth-token` and :option:`arg`
|
||||
|
||||
.. program:: hg
|
||||
|
||||
|
||||
@@ -347,6 +347,8 @@ def test_static_output(app):
|
||||
'perl'),
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span",
|
||||
'\+p'),
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-objc']/code/span",
|
||||
'--ObjC\\+\\+'),
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span",
|
||||
'--plugin.option'),
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']"
|
||||
|
||||
Reference in New Issue
Block a user