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 * BUGFIX
* remove only first hashtag from a multiline comment * remove only first hashtag from a multiline comment
* add better handling of meta dependencies in templates

View File

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

View File

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