trim again
This commit is contained in:
parent
889886112e
commit
6132f895f5
|
|
@ -5,4 +5,4 @@
|
||||||
{% import "_macros.jinja2" as macros %}
|
{% import "_macros.jinja2" as macros %}
|
||||||
|
|
||||||
{% set min_sdk_version = macros.get_value(cookiecutter.pyproject, "tool.flet.android.min_sdk_version") %}
|
{% set min_sdk_version = macros.get_value(cookiecutter.pyproject, "tool.flet.android.min_sdk_version") %}
|
||||||
min_sdk_version: {{ min_sdk_version }}
|
min_sdk_version: {{ min_sdk_version | trim }}
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
{# _macros.jinja2 #}
|
{# _macros.jinja2 #}
|
||||||
|
|
||||||
{% macro get_value(dict, path) -%}
|
{% macro get_value(dict, path) %}
|
||||||
{# Split the path into keys #}
|
{# Split the path into keys #}
|
||||||
{% set keys = path.split('.') %}
|
{% set keys = path.split('.') %}
|
||||||
{% if keys and dict is mapping and keys[0] in dict -%}
|
{% if keys and dict is mapping and keys[0] in dict %}
|
||||||
{% set next_value = dict[keys[0]] %}
|
{% set next_value = dict[keys[0]] %}
|
||||||
{% if keys | length == 1 -%}
|
{% if keys | length == 1 %}
|
||||||
{{ next_value | string | trim }}
|
{{ next_value }}
|
||||||
{%- else -%}
|
{% else %}
|
||||||
{{ get_value(next_value, keys[1:] | join('.')) | string | trim }}
|
{{ get_value(next_value, keys[1:] | join('.')) }}
|
||||||
{%- endif %}
|
{% endif %}
|
||||||
{%- else -%}
|
{% else %}
|
||||||
{{ none }}
|
{{ none }}
|
||||||
{%- endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{% endmacro %}
|
||||||
Loading…
Reference in New Issue