mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
module_formatter: .rst now correctly handles code examples
- fixed template (it was the template), adding indentation with Jinja2 - added description of code examples to man-page template (was missing) - fixed fireball, cron, and debug module examples to confrom
This commit is contained in:
@@ -46,6 +46,10 @@
|
||||
.SH EXAMPLES
|
||||
{% for e in examples %}
|
||||
.PP
|
||||
{% if e['description'] %}
|
||||
@{ e['description'] | jpfunc }@
|
||||
{% endif %}
|
||||
|
||||
.nf
|
||||
@{ e['code'] }@
|
||||
.fi
|
||||
|
||||
@@ -45,9 +45,11 @@
|
||||
|
||||
{% for example in examples %}
|
||||
{% if example['description'] %}<p>@{ example['description'] | html_ify }@</p>{% endif %}
|
||||
<p><pre>
|
||||
@{ example['code'] }@
|
||||
</pre></p>
|
||||
<p>
|
||||
<pre>
|
||||
@{ example['code'] | indent(4, True) }@
|
||||
</pre>
|
||||
</p>
|
||||
{% endfor %}
|
||||
<br/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user