HubSpot / jinjava

Jinja template engine for Java
Apache License 2.0
690 stars 168 forks source link

Use renderFlat inside of the RenderFilter #1159

Closed jasmith-hs closed 6 months ago

jasmith-hs commented 6 months ago

So that extends roots are not prematurely processed. Similar to how expression nodes use interpreter.renderFlat when doing nested interpretation, the RenderFilter must do the same, otherwise it will process the extends roots early. What this looks like is that the new test I added's output looks like this before this fix:

I am the extension body
You should never see this text in the output!
Base footer

The reason this bug happens is because:

What should happen (what now happens after this PR) is: