You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
I've noticed that spaces preceding commas in inline tables seem to create problems for the formatter. Notably, that everything starting with the comma until the next table item is formatted as plain-text (unformatted).
name = { first = "Tom", last = "Preston-Werner" }
# This works fine.point = { x = 1, y = 2 }
animal = { name = "pug" }
But if I put a space between the value "Tom" and the comma, it breaks. Everything is unformatted up to the table item point
name = { first = "Tom" , last = "Preston-Werner" }
# ^ space here makes everything following formatted as plain text# This comment and above are formatted as plain text# Item after this line returns to correct highlightingpoint = { x = 1, y = 2 }
animal = { name = "pug" }
This seems to be independent of the value type. It also breaks for integer values.
name = { first = "Tom" , last = "Preston-Werner" }
point = { x = 1 , y = 2 }
# ^ space here also also breaks the formatter# This comment and above are formatted as plain textanimal = { name = "pug" }
This bug seems to only apply inside inline tables, and not between them. For example, if i turn point into an array of inline tables, the comma spacing doesn't seem to be affected.
name = { first = "Tom", last = "Preston-Werner" }
# Objects in arrays seem to be finepoint = [ {x = 1} , {y = 2} ]
# ^ This space does not cause a problemanimal = { name = "pug" }
Better TOML: v0.3.2
VS Code: v1.30.2
OSX: v10.14.2
The text was updated successfully, but these errors were encountered:
I've noticed that spaces preceding commas in inline tables seem to create problems for the formatter. Notably, that everything starting with the comma until the next table item is formatted as plain-text (unformatted).
Take this example from from the spec.
But if I put a space between the value
"Tom"
and the comma, it breaks. Everything is unformatted up to the table itempoint
This seems to be independent of the value type. It also breaks for integer values.
This bug seems to only apply inside inline tables, and not between them. For example, if i turn
point
into an array of inline tables, the comma spacing doesn't seem to be affected.Better TOML: v0.3.2
VS Code: v1.30.2
OSX: v10.14.2
The text was updated successfully, but these errors were encountered: