Closed yassun7010 closed 7 months ago
Oof. Thanks for the report, this sucks.
I just reproduced on sqlfmt.com - it's specifically an issue with jinjafmt, this doesn't happen if you don't have black installed or run sqlfmt with the --no-jinjafmt option. A --fmt: off comment above the jinja block also stops it.
The patch for this issue has been released in v0.21.1
Describe the bug There is a bug where if you use a multi-line string to indent an expression in a jinja block, the indentation will increase each time the format is updated.
To Reproduce
The indentation of expressions within blocks in jinja is added each time it is formatted. Every time you change the select statement and need to reformat it, the indentation increases.
Expected behavior Indentation does not increase after formatting.
Actual behavior Provide any output generated by sqlfmt here. If this is a formatting issue, include the code generated by sqlfmt.
Additional context
https://github.com/tconbeer/sqlfmt/assets/47286750/f5714604-09c8-4c9b-ae7f-ad09955f95e2