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 was archived by the owner on Apr 1, 2025. It is now read-only.
I'm seeing doubling of the first newline when using the folding style of block. I can replicate this using yaml.Node{...}, but it seems clearer to parse a string directly. This is my test harness:
package main
import (
"os"
yaml "gopkg.in/yaml.v3"
)
funcmain() {
src:= []byte(`> line 1 line 2 line 3 line 4`)
vardata yaml.Nodeiferr:=yaml.Unmarshal(src, &data); err!=nil {
panic(err)
}
enc:=yaml.NewEncoder(os.Stdout)
iferr:=enc.Encode(&data); err!=nil {
panic(err)
}
enc.Close()
}```The result is:```text
>
line 1 line 2 line 3
line 4
The second newline between 3 & 4 is, I think a mistake. It becomes clearer if we indent line 2 like so (test):