-
-
Notifications
You must be signed in to change notification settings - Fork 195
Closed
Labels
Description
When marshalling a block scalar, the result does not follow custom indentation.
yaml.MarshalWithOptions(map[string]interface{}{
"scalar": "foo\nbar\n",
}, yaml.Indent(4))
expected result:
scalar: |
foo
bar
actual result:
scalar: |
foo
bar
I've made a playground to illustrate the issue, comparing behaviors with other yaml library: https://go.dev/play/p/aaAtMUIt77R
pavalx