language-formatters-pre-commit-hooks icon indicating copy to clipboard operation
language-formatters-pre-commit-hooks copied to clipboard

Spaces before and after curly brackets in TOML

Open my1e5 opened this issue 5 months ago • 0 comments

From the TOML specification on arrays - https://toml.io/en/v1.0.0#array

contributors = [
  "Foo Bar <[email protected]>",
  { name = "Baz Qux", email = "[email protected]", url = "https://example.com/bazqux" }
]

Note how there are spaces before and after the curly brackets.

But pretty-format-toml is removing these spaces.

contributors = [
  "Foo Bar <[email protected]>",
-  { name = "Baz Qux", email = "[email protected]", url = "https://example.com/bazqux" }
+  {name = "Baz Qux", email = "[email protected]", url = "https://example.com/bazqux"},
]

my1e5 avatar Sep 26 '24 13:09 my1e5