mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
allow nested dictionaries in dict_to_lua
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{% macro dict_to_lua(dict) -%}
|
{% macro dict_to_lua(dict) -%}
|
||||||
{
|
{
|
||||||
{%- for key, value in dict.items() -%}
|
{%- for key, value in dict.items() -%}
|
||||||
["{{ key }}"] = {{ value | safe }}{% if not loop.last %},{% endif %}
|
["{{ key }}"] = {% if value is mapping %}{{ dict_to_lua(value) }}{% else %}{{ value | safe }}{% endif %}{% if not loop.last %},{% endif %}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
}
|
}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
Reference in New Issue
Block a user