Merge pull request #1750 from pjxiao/master

Fix #1658
This commit is contained in:
Takayuki SHIMIZUKAWA 2015-03-03 06:51:37 +09:00
commit dfcd84c5dd

View File

@ -660,12 +660,14 @@ class StandardDomain(Domain):
# most obvious thing: we are a flag option without program
if target.startswith(('-', '/', '+')):
progname = node.get('std:program')
else:
elif ' -' in target or ' /' in target:
try:
progname, target = re.split(r' (?=-|--|/|\+)', target, 1)
except ValueError:
return None
progname = ws_re.sub('-', progname.strip())
else:
progname = None
docname, labelid = self.data['progoptions'].get((progname, target),
('', ''))
if not docname: