Closed
Description
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.
{% 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 0.21.1
Activity