Make prope use of jinja templating features
join is available in jinja-2.6, released in 2011.
This commit is contained in:
parent
573211150f
commit
e10ad0e745
@ -3,10 +3,7 @@
|
|||||||
{%- macro format_value(key, value) %}
|
{%- macro format_value(key, value) %}
|
||||||
{#- Some settings, like virtual_alias_maps can take multiple values. Handle this case. -#}
|
{#- Some settings, like virtual_alias_maps can take multiple values. Handle this case. -#}
|
||||||
{%- if value is iterable and value is not string -%}
|
{%- if value is iterable and value is not string -%}
|
||||||
{{ key }} {% for item in value -%}
|
{{ key }} {{ value|join(", ") }}
|
||||||
{{ item }}
|
|
||||||
{%- if not loop.last %}, {% endif %}
|
|
||||||
{%- endfor %}
|
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ key }} {{ value }}
|
{{ key }} {{ value }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
Loading…
Reference in New Issue
Block a user