mercari / hcledit

Go package to edit HCL configuration
MIT License
44 stars 13 forks source link

[hcledit/create] add new line before appending a block level comment #105

Closed ryan-ph closed 4 months ago

ryan-ph commented 4 months ago

WHAT

title

WHY

Currently, this appends the comment to the line prior to the new block, which is not what we want. The previous behavior would result in:

prev {
} // comment
block "new block" {
}

This fixes this to do:

prev {
}
// comment
block "new block" {
}