mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Docs: Keep the module index clean (#46155)
A lot of modules have a short_description with a trailing dot even though we don't want trailing dots in the index. This change removes it when creating the document index.
This commit is contained in:
parent
aedcf9fed7
commit
771a3983d2
2 changed files with 3 additions and 2 deletions
|
@ -689,7 +689,7 @@ def main():
|
|||
display.vv(key)
|
||||
display.vvvvv(pp.pformat(('record', record)))
|
||||
if record.get('doc', None):
|
||||
short_desc = record['doc']['short_description']
|
||||
short_desc = record['doc']['short_description'].rstrip('.')
|
||||
if short_desc is None:
|
||||
display.warning('short_description for %s is None' % key)
|
||||
short_desc = ''
|
||||
|
|
|
@ -103,6 +103,7 @@ def read_docstub(filename):
|
|||
capturing = True
|
||||
doc_stub.append(line)
|
||||
|
||||
data = AnsibleLoader(r"".join(doc_stub), file_name=filename).get_single_data()
|
||||
short_description = r''.join(doc_stub).strip().rstrip('.')
|
||||
data = AnsibleLoader(short_description, file_name=filename).get_single_data()
|
||||
|
||||
return data
|
||||
|
|
Loading…
Reference in a new issue