goccy / go-yaml

YAML support for the Go language
MIT License
1.12k stars 129 forks source link

fix: Avoid truncating last char from folded strings #434

Open charithe opened 6 months ago

charithe commented 6 months ago

As described in #433, if the last character of a folded string is the very last character in the file (no trailing whitespace), it's not included in the token's Value.

While fixing this, I also noticed that the column information for the folded and literal strings were for the end rather than for the beginning. I've (hopefully) fixed that as well.

Fixes #433