mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
allow nested dictionaries in dict_to_lua
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% macro dict_to_lua(dict) -%}
|
||||
{
|
||||
{%- 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 -%}
|
||||
}
|
||||
{%- endmacro %}
|
||||
|
Reference in New Issue
Block a user