As I was going to edit some of the logic here for eager execution, I found this redundant logic which pushes and pops the parent path for every node within a block, rather than just doing it once per block.
For instance, if I had a block:
{% block %}
Hi
{% if hungry %}
hungry,
{% endif %}
I'm dad!
{% endblock %}
The current logic pushes/pops the parent path for each: Hi, {% if hungry %}, I'm dad!.
Instead, we can just do this once outside the for loop.
As I was going to edit some of the logic here for eager execution, I found this redundant logic which pushes and pops the parent path for every node within a block, rather than just doing it once per block.
For instance, if I had a block:
The current logic pushes/pops the parent path for each:
Hi
,{% if hungry %}
,I'm dad!
. Instead, we can just do this once outside the for loop.The logic was originally added in https://github.com/HubSpot/jinjava/pull/363, and there's no need to do it once per node.