Skip to content

Conversation

@jasmith-hs
Copy link
Contributor

Reverts #1055

Now handles the scenario where there's a macro function that is imported under an alias which references deferred variables only present on the import file's scope. We handle this by setting those variables to their respective references on the alias map. This leads to a deferred imported macro function that reconstructs like:

{% macro macros.getValueAnd(other) %}{% set value = macros.value %}
{{ value ~ ' ' ~ other }}
{% endmacro %}

So that value has meaning when rendering this macro function in a higher-level scope, as we will have stored the value of value in macros.value when calling {% import file as macros %}

@jasmith-hs jasmith-hs merged commit 20eb16f into master Apr 20, 2023
@jasmith-hs jasmith-hs deleted the revert-1055-revert-1048-improve-for-loop-success branch April 20, 2023 17:32
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