Closed silverraven691 closed 9 months ago
Thank you for reporting this. Indeed, I can reproduce this and Topiary actually fails with this input, because the idempotency constraint is flaunted (Nickel must disable this).
That record which gets expanded (and ultimately fails) is on a single line, so I would expect no changes to the original input. If it were to span multiple lines, I would expect something like:
{
a = "a",
b = "b"
}
...which is clearly not happening, either :disappointed:
I will look into this...
(cc @yannham)
Minimal reproducer:
{
config
| { labels = { a = "a" } }
= {}
}
The erroneous line break that's being added between the record field and the =
sign, in the annotation, is due to this rule:
(
(#scope_id! "annotated_assignment")
"=" @prepend_spaced_scoped_softline
)
Either this rule is too general, or the scope is too wide...
Describe the bug
To Reproduce I write this
Turns into this after a
nickel format
Which then turns into this after a second
nickel format
Expected behavior I expect no changes to happen.
Environment
Additional context This is stable