sqlfmt icon indicating copy to clipboard operation
sqlfmt copied to clipboard

Bug: Comments inside of --fmt:off blocks are still formatted

Open tconbeer opened this issue 3 years ago • 0 comments

Describe the bug The --fmt: off tags should stop all formatting of the contained code, but today that is not the case, since comments may be rendered differently in those blocks

To Reproduce

-- fmt: off
where something_long = something_else_long -- and there is a long comment that should stay on this line
-- fmt: on

Expected behavior

-- fmt: off
where something_long = something_else_long -- and there is a long comment that should stay on this line
-- fmt: on

Actual behavior

-- fmt: off
-- and there is a long comment that should stay on this line
where something_long = something_else_long
-- fmt: on

Additional context What is the output of sqlfmt --version? 0.5.1

tconbeer avatar Feb 22 '22 21:02 tconbeer