Closed cefn closed 7 years ago
Just for reference, (forgot to mention), a workaround to prevent this issue is to add a space at the beginning of the template, so it looks like...
{% include 'squares.tpl' %}
...instead of
{% include 'squares.tpl' %}
At that point whatever logic allocates the seq number as a suffix for the function name starts functioning properly. I'm a bit lost following how seq and renderX closures are used, (yield is new to me), so I haven't fathomed what change can solve this - don't have a good handle on how it works.
Should be fixed with b5540ca68fecfa606726c829e6605b73c93bbb13. (commit updated)
This is demonstrated by https://github.com/cefn/utemplate/blob/demo_render_breakage/examples/immediateinclude.tpl which immediately hands off to another template, without sending even a character beforehand.
The compiled code from...
python3 ./utemplate_util.py run examples/immediateinclude.tpl
...looks as follows, with no render() function and two render1() functions...It is therefore impossible to run the template and utemplate_util.py predictably dies with...