mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-13 08:52:13 -05:00
commit
dfcd84c5dd
1 file changed
+3
-1
@@ -660,12 +660,14 @@ class StandardDomain(Domain):
|
|||||||
# most obvious thing: we are a flag option without program
|
# most obvious thing: we are a flag option without program
|
||||||
if target.startswith(('-', '/', '+')):
|
if target.startswith(('-', '/', '+')):
|
||||||
progname = node.get('std:program')
|
progname = node.get('std:program')
|
||||||
else:
|
elif ' -' in target or ' /' in target:
|
||||||
try:
|
try:
|
||||||
progname, target = re.split(r' (?=-|--|/|\+)', target, 1)
|
progname, target = re.split(r' (?=-|--|/|\+)', target, 1)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return None
|
return None
|
||||||
progname = ws_re.sub('-', progname.strip())
|
progname = ws_re.sub('-', progname.strip())
|
||||||
|
else:
|
||||||
|
progname = None
|
||||||
docname, labelid = self.data['progoptions'].get((progname, target),
|
docname, labelid = self.data['progoptions'].get((progname, target),
|
||||||
('', ''))
|
('', ''))
|
||||||
if not docname:
|
if not docname:
|
||||||
|
|||||||
Reference in new issue
Block a user