Closed yassun7010 closed 6 months ago
Describe the bug for...else...endfor statements does not support.
for...else...endfor
I have verified that it works correctly in jinja sandbox.
To Reproduce The following code fails on sandbox.
{% for i in range(5) %} select 1 {% else %} select 2 {% endfor %}
Expected behavior
select 1 select 1 select 1 select 1 select 1
Actual behavior The following error occur.
sqlfmt encountered an error: Closing jinja tag '{% endfor %}' found at pos 61 does not match last opened tag '{% else %}' found at pos 37.
Additional context What is the output of sqlfmt --version?
sqlfmt --version
sqlfmt, version 0.21.1
Thanks for the report. I didn't realize you could use for...else in Jinja
Describe the bug
for...else...endfor
statements does not support.I have verified that it works correctly in jinja sandbox.
To Reproduce The following code fails on sandbox.
Expected behavior
Actual behavior The following error occur.
Additional context What is the output of
sqlfmt --version
?