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:
Dag Wieers 2018-09-27 20:25:38 +02:00 committed by Alicia Cozine
parent aedcf9fed7
commit 771a3983d2
2 changed files with 3 additions and 2 deletions

View file

@ -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 = ''

View file

@ -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