goccy / go-yaml

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

fix: remove any trailing empty lines if the block scalar has strip indicator #421

Closed zoncoen closed 7 months ago

zoncoen commented 7 months ago

What

SSIA

Why

Stripping is specified by the “-” chomping indicator. In this case, the final line break and any trailing empty lines are excluded from the scalar’s content.

https://yaml.org/spec/1.2.2/#8112-block-chomping-indicator

Before submitting your PR, please confirm the following.

codecov-commenter commented 7 months ago

Codecov Report

Merging #421 (4618994) into master (42fb764) will increase coverage by 0.41%. Report is 14 commits behind head on master. The diff coverage is n/a.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #421 +/- ## ========================================== + Coverage 75.61% 76.02% +0.41% ========================================== Files 13 13 Lines 4650 4692 +42 ========================================== + Hits 3516 3567 +51 + Misses 874 866 -8 + Partials 260 259 -1 ```
goccy commented 7 months ago

LGTM !! Thank you for your great PR !