add better handling of meta dependencies in templates

This commit is contained in:
Robert Kaussow 2020-03-08 16:39:18 +01:00
parent 4252445ea2
commit 2b4de240be
3 changed files with 13 additions and 4 deletions

View File

@ -1,2 +1,3 @@
* BUGFIX
* remove only first hashtag from a multiline comment
* add better handling of meta dependencies in templates

View File

@ -3,9 +3,13 @@
## Dependencies
{% if meta | deep_get(meta, "dependencies.value") %}
{% for item in meta.dependencies.value %}
* {{ item }}
{% if meta.dependencies.value is mapping %}
{{ meta.dependencies.value.dependencies | to_nice_yaml(indent=0) }}
{% else %}
{% for line in meta.dependencies.value %}
{{ line }}
{% endfor %}
{% endif %}
{% else %}
None.
{% endif %}

View File

@ -3,9 +3,13 @@
## Dependencies
{% if meta | deep_get(meta, "dependencies.value") %}
{% for item in meta.dependencies.value %}
* {{ item }}
{% if meta.dependencies.value is mapping %}
{{ meta.dependencies.value.dependencies | to_nice_yaml(indent=0) }}
{% else %}
{% for line in meta.dependencies.value %}
{{ line }}
{% endfor %}
{% endif %}
{% else %}
None.
{% endif %}