1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #1774 from jpmens/adoc1

cleanup Example output in ansible-doc
This commit is contained in:
Stephen Fromm 2012-12-14 09:02:21 -08:00
commit 292ae0ac00

View file

@ -89,8 +89,10 @@ def print_man(doc):
subsequent_indent=opt_indent) subsequent_indent=opt_indent)
if 'examples' in doc and len(doc['examples']) > 0:
print "Example%s:\n" % ('' if len(doc['examples']) < 2 else 's')
for ex in doc['examples']: for ex in doc['examples']:
print "%s%s" % (opt_indent, ex['code']) print "%s\n" % (ex['code'])
def print_snippet(doc): def print_snippet(doc):