Address copilot comments

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
pull/31952/head
Matheus Pimenta 3 days 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*")
// 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_
// 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
// are preserved through SplitManifests for single-doc inputs.
// Block scalar chomping indicator tests using | (clip), |- (strip), and |+ (keep)
// 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",
input: `

@ -970,10 +970,13 @@ metadata:
`,
},
// Block scalar chomping indicator tests: | (clip), |- (strip), |+ (keep)
// combined with 0, 1, and 2 trailing newlines after the block content.
// Block scalar chomping indicator tests using | (clip), |- (strip), and |+ (keep)
// 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",
files: map[string]string{

@ -36,7 +36,7 @@ type SimpleHead struct {
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_
// 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
// are preserved through SplitManifests for single-doc inputs.
// Block scalar chomping indicator tests using | (clip), |- (strip), and |+ (keep)
// 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",
input: `

Loading…
Cancel
Save