Handling of Carriage Return (`\r`) in a double-quoted string differs from `gopkg.in/yaml.*.`
k1LoW opened this issue · comments
Hi @goccy !
I found that handling carriage return ( \r
) in a string differs from gopkg.in/yaml.*.
.
Input:
var: "hello\r\nworld"
Unmarshal Result:
goccy/go-yaml 1.11.0 | gopkg.in/yaml.v2 | gopkg.in/yaml.v3 |
---|---|---|
map[string]interface {}{"var":"hello\\r\nworld"} |
map[interface {}]interface {}{"var":"hello\r\nworld"} |
map[string]interface {}{"var":"hello\r\nworld"} |
Playground is https://go.dev/play/p/Q-cdur6z8B9
Is this the intended behavior?