mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Documentation: show non-string non-iterable defaults for choices (#40212)
* Also marking non-string defaults. * Adding list filter from #37517 to plugin_formatter. * Simplifying list test. * Redistribute imports
This commit is contained in:
parent
5024b4e445
commit
0752dc12b7
2 changed files with 7 additions and 1 deletions
2
docs/templates/plugin.rst.j2
vendored
2
docs/templates/plugin.rst.j2
vendored
|
@ -142,7 +142,7 @@ Parameters
|
|||
{% elif choice is sameas false %}
|
||||
{% set choice = 'no' %}
|
||||
{% endif %}
|
||||
{% if (value.default is string and value.default == choice) or (value.default is iterable and value.default is not string and choice in value.default) %}
|
||||
{% if (value.default is not list and value.default == choice) or (value.default is list and choice in value.default) %}
|
||||
<li><div style="color: blue"><b>@{ choice | escape }@</b> ←</div></li>
|
||||
{% else %}
|
||||
<li>@{ choice | escape }@</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue