diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py index 3f627bcf83..ef92ed7280 100755 --- a/docs/bin/plugin_formatter.py +++ b/docs/bin/plugin_formatter.py @@ -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 = '' diff --git a/lib/ansible/parsing/plugin_docs.py b/lib/ansible/parsing/plugin_docs.py index f75577d531..11f3f5c987 100644 --- a/lib/ansible/parsing/plugin_docs.py +++ b/lib/ansible/parsing/plugin_docs.py @@ -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