Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align extends semantics with Jinja2 #140

Merged
merged 3 commits into from Nov 8, 2022
Merged

Conversation

mitsuhiko
Copy link
Owner

This aligns the runtime behavior of {% extends %} with Jinja2. Fixes #136

Specifically top level assignments (or macro declarations) still execute before the parent template is included. This behavior is somewhat dubious because it can lead to unexpected results if the parent template uses the same variable name. Longer term it might be wise to correct this, but for now this is an acceptable tradeoff.

This also removes {% block %} if the multi-template feature is not turned on which was an accidental omission.

@mitsuhiko mitsuhiko merged commit 07eb55a into main Nov 8, 2022
@mitsuhiko mitsuhiko deleted the feature/jinja2-extends branch November 8, 2022 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Macro in child template isn't found inside of block
1 participant