Invalid YAML parses successfully: indentation changed after scalar value
braydonk opened this issue · comments
Describe the bug
The following YAML is invalid:
a: 'b'
b: 1
It is invalid because the indentation level has changed after a scalar value, which doesn't make sense.
To Reproduce
https://go.dev/play/p/WkfZUGjlNY6
Expected behavior
This yaml should be rejected with an error.
Screenshots
If applicable, add screenshots to help explain your problem.
Version Variables
- Go version: 1.21
- go-yaml's Version: v1.11.2
Additional context
In the playground, I show that yaml.v3
correctly rejects the invalid yaml.
Very likely #358 is related
Thank you for your reporting. I'll try to fix this problem.