nixfmt icon indicating copy to clipboard operation
nixfmt copied to clipboard

Tab-indented multiline-strings are turned into single-line strings

Open infinisil opened this issue 1 year ago • 2 comments

Input (note that every line starts with a single tab character):

	''
	  foo
	  bar
	''

Expected output:

''
  foo
  bar
''

Actual output:

"  foo\n  bar\n"

This can be disastrous: https://gitlab.com/Fuzen-py/configsreborn/-/blob/2a6b5aa5c8bee37cc13ab35d186b8fa604f62b2c/Snow/homeManager/programs/waybar/default.nix#L93-96

infinisil avatar Apr 05 '23 21:04 infinisil