fix kyaml issue with multiline scalars

This commit is contained in:
Natasha Sarkar
2021-07-14 15:01:53 -07:00
parent b5091a566a
commit 477d8930e0
6 changed files with 36 additions and 21 deletions

View File

@@ -2653,7 +2653,7 @@ func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, si
// Do we need to fold line breaks?
if len(leading_break) > 0 && leading_break[0] == '\n' {
if len(trailing_breaks) == 0 {
s = append(s, ' ')
s = append(s, '\n')
} else {
s = append(s, trailing_breaks...)
}