Address copilot comments

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
pull/31952/head
Matheus Pimenta 6 months ago
parent 0aca3aecd8
commit c318a6ef9d
No known key found for this signature in database
GPG Key ID: 4639F038AE28FBFF

@ -36,7 +36,7 @@ type SimpleHead struct {
var sep = regexp.MustCompile("(?:^|\\s*\n)---\\s*") var sep = regexp.MustCompile("(?:^|\\s*\n)---\\s*")
// SplitManifests takes a string of manifest and returns a map that contains individual manifests // SplitManifests takes a manifest string and returns a map containing individual manifests.
// //
// **Note for Chart API v3**: This function (due to the regex above) has allowed _WRONG_ // **Note for Chart API v3**: This function (due to the regex above) has allowed _WRONG_
// Go templates to be defined inside charts across the years. The generated text from Go // Go templates to be defined inside charts across the years. The generated text from Go

@ -118,10 +118,13 @@ metadata:
}, },
}, },
// Block scalar chomping tests: verify that trailing newlines // Block scalar chomping indicator tests using | (clip), |- (strip), and |+ (keep)
// are preserved through SplitManifests for single-doc inputs. // inputs with 0, 1, and 2 trailing newlines after the block content.
// Note: the emitter may normalize the output chomping indicator when the
// trailing newline count makes another indicator equivalent for the result.
// | (clip) // | (clip) input — clips trailing newlines to exactly one, though with
// 0 trailing newlines the emitted output may normalize to |-.
{ {
name: "block scalar clip (|) with 0 trailing newlines", name: "block scalar clip (|) with 0 trailing newlines",
input: ` input: `

@ -970,10 +970,13 @@ metadata:
`, `,
}, },
// Block scalar chomping indicator tests: | (clip), |- (strip), |+ (keep) // Block scalar chomping indicator tests using | (clip), |- (strip), and |+ (keep)
// combined with 0, 1, and 2 trailing newlines after the block content. // inputs with 0, 1, and 2 trailing newlines after the block content.
// Note: the emitter may normalize the output chomping indicator when the
// trailing newline count makes another indicator equivalent for the result.
// | (clip) — clips trailing newlines to exactly one // | (clip) input — clips trailing newlines to exactly one, though with
// 0 trailing newlines the emitted output may normalize to |-.
{ {
name: "block scalar clip (|) with 0 trailing newlines", name: "block scalar clip (|) with 0 trailing newlines",
files: map[string]string{ files: map[string]string{

@ -36,7 +36,7 @@ type SimpleHead struct {
var sep = regexp.MustCompile("(?:^|\\s*\n)---\\s*") var sep = regexp.MustCompile("(?:^|\\s*\n)---\\s*")
// SplitManifests takes a string of manifest and returns a map that contains individual manifests // SplitManifests takes a manifest string and returns a map containing individual manifests.
// //
// **Note for Chart API v3**: This function (due to the regex above) has allowed _WRONG_ // **Note for Chart API v3**: This function (due to the regex above) has allowed _WRONG_
// Go templates to be defined inside charts across the years. The generated text from Go // Go templates to be defined inside charts across the years. The generated text from Go

@ -118,10 +118,13 @@ metadata:
}, },
}, },
// Block scalar chomping tests: verify that trailing newlines // Block scalar chomping indicator tests using | (clip), |- (strip), and |+ (keep)
// are preserved through SplitManifests for single-doc inputs. // inputs with 0, 1, and 2 trailing newlines after the block content.
// Note: the emitter may normalize the output chomping indicator when the
// trailing newline count makes another indicator equivalent for the result.
// | (clip) // | (clip) input — clips trailing newlines to exactly one, though with
// 0 trailing newlines the emitted output may normalize to |-.
{ {
name: "block scalar clip (|) with 0 trailing newlines", name: "block scalar clip (|) with 0 trailing newlines",
input: ` input: `

Loading…
Cancel
Save