Skip to content

Conversation

@jasmith-hs
Copy link
Contributor

This is so set tags don't modify variables in the wrong scope when doing recursive evaluation.

Without this change the output of the test is:

% set list = [] %}{% if deferred %}

{% set list = [] %}{% do list.append(1) %}1{% set depth = 2 %}
{% do list.append(2) %}2{% set depth = 3 %}
{% do list.append(3) %}3
{% do list.append(3) %}3
{% do list.append(3) %}3
{% endif %}

And the final output is:

1
2
3
3
3

This happened because the depth parameter from a child macro set tag reconstruction was being evaluated with nested interpretation and it was overriding the depth parameter for the current macro function.

…odify variables in the wrong scope when doing recursive evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants