Skip to content

don't finalize TemplateData nodes#1080

Merged
davidism merged 1 commit intomasterfrom
no-finalize-template-data
Oct 13, 2019
Merged

don't finalize TemplateData nodes#1080
davidism merged 1 commit intomasterfrom
no-finalize-template-data

Conversation

@davidism
Copy link
Copy Markdown
Member

Finalize only applies to the output of expressions (constant or not). TemplateData nodes are static content that should not be finalized.

closes #63
closes #535

Given the following template:

abc
{{ value }}
def

A finalize function that always returned the value "replaced" would result in:

replaced
replaced
replaced

Now it returns:

abc
replaced
def

This also cleans up the code gen for the finalize function and adds tests for @contextfunction, @evalcontextfunction and @environmentfunction.

Finalize only applies to the output of expressions (constant or not).
Add tests for context, eval, and env finalize functions.
@davidism davidism added this to the 2.11.0 milestone Oct 13, 2019
@davidism davidism merged commit 0687adf into master Oct 13, 2019
@davidism davidism deleted the no-finalize-template-data branch October 13, 2019 04:34
@davidism davidism mentioned this pull request Nov 20, 2019
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Output finalize function issue

1 participant