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.
pull/46229/head
Dag Wieers 6 years ago committed by Alicia Cozine
parent aedcf9fed7
commit 771a3983d2

@ -689,7 +689,7 @@ def main():
display.vv(key) display.vv(key)
display.vvvvv(pp.pformat(('record', record))) display.vvvvv(pp.pformat(('record', record)))
if record.get('doc', None): if record.get('doc', None):
short_desc = record['doc']['short_description'] short_desc = record['doc']['short_description'].rstrip('.')
if short_desc is None: if short_desc is None:
display.warning('short_description for %s is None' % key) display.warning('short_description for %s is None' % key)
short_desc = '' short_desc = ''

@ -103,6 +103,7 @@ def read_docstub(filename):
capturing = True capturing = True
doc_stub.append(line) 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 return data

Loading…
Cancel
Save