diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-07-06 08:14:28 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-07-06 08:14:28 +0000 |
commit | ae80ab98842116364e746beb5684c92cc9f239cd (patch) | |
tree | 7051d1a5e28fcbf776920af3d326bc8f0903cad7 | |
parent | 8dcc41a8d19982702000ba4767f04ba71b14079a (diff) | |
parent | 7b27ee3e424f5fb2701c1e15ffd38a87ea70023d (diff) | |
download | oslo-config-ae80ab98842116364e746beb5684c92cc9f239cd.tar.gz |
Merge "sphinxext: Add arguments for oslo.config:group directive"
-rw-r--r-- | oslo_config/sphinxext.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/oslo_config/sphinxext.py b/oslo_config/sphinxext.py index 896f0c8..67ab509 100644 --- a/oslo_config/sphinxext.py +++ b/oslo_config/sphinxext.py @@ -321,8 +321,9 @@ class ConfigOptXRefRole(XRefRole): class ConfigGroup(rst.Directive): + required_arguments = 1 + optional_arguments = 0 has_content = True - option_spec = { 'namespace': directives.unchanged, } @@ -331,7 +332,7 @@ class ConfigGroup(rst.Directive): env = self.state.document.settings.env app = env.app - group_name = ' '.join(self.content) + group_name = self.arguments[0] namespace = self.options.get('namespace') cached_groups = env.domaindata['oslo.config']['groups'] @@ -359,6 +360,9 @@ class ConfigGroup(rst.Directive): _add(title) _add('-' * len(title)) + _add('') + for line in self.content: + _add(line) node = nodes.section() node.document = self.state.document nested_parse_with_titles(self.state, result, node) |