diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-07-07 18:50:58 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-07-07 18:50:58 +0900 |
commit | 1c152d249c2f1845497dbc40b0c18113ac19663e (patch) | |
tree | 9a08faf7a3158188a10f069868ac60c4b006ad45 /sphinx/domains/std.py | |
parent | c9078fa8c80672354a1b1a078e12e2921d7e73ed (diff) | |
parent | 96fa46e7b36a4f7571169a76b42fffb547702952 (diff) | |
download | sphinx-git-1c152d249c2f1845497dbc40b0c18113ac19663e.tar.gz |
Merge branch '2.0'
Diffstat (limited to 'sphinx/domains/std.py')
-rw-r--r-- | sphinx/domains/std.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py index 5d3362313..9d094d1a9 100644 --- a/sphinx/domains/std.py +++ b/sphinx/domains/std.py @@ -197,12 +197,14 @@ class Cmdoption(ObjectDescription): domain.add_program_option(currprogram, optname, self.env.docname, signode['ids'][0]) - # create only one index entry for the whole option - if optname == firstname: - self.indexnode['entries'].append( - ('pair', _('%scommand line option; %s') % - ((currprogram and currprogram + ' ' or ''), sig), - signode['ids'][0], '', None)) + # create an index entry + if currprogram: + descr = _('%s command line option') % currprogram + else: + descr = _('command line option') + for option in sig.split(', '): + entry = '; '.join([descr, option]) + self.indexnode['entries'].append(('pair', entry, signode['ids'][0], '', None)) class Program(SphinxDirective): |