diff --git a/pkg/yqlib/doc/operators/headers/string-operators.md b/pkg/yqlib/doc/operators/headers/string-operators.md index 7de0ccaf..b426b977 100644 --- a/pkg/yqlib/doc/operators/headers/string-operators.md +++ b/pkg/yqlib/doc/operators/headers/string-operators.md @@ -27,7 +27,7 @@ a: | cat ``` -Using `$( exp )` wont work, as it will trim the trailing new line. +Using `$( exp )` wont work, as it will trim the trailing newline. ``` m=$(echo "cat\n") yq -n '.a = strenv(m)' @@ -49,7 +49,7 @@ a: | cat ``` -Similarly, if you're trying to set the content from a file, and want a trailing new line: +Similarly, if you're trying to set the content from a file, and want a trailing newline: ``` IFS= read -rd '' output < <(cat my_file) diff --git a/pkg/yqlib/doc/operators/string-operators.md b/pkg/yqlib/doc/operators/string-operators.md index c473a318..71b5be89 100644 --- a/pkg/yqlib/doc/operators/string-operators.md +++ b/pkg/yqlib/doc/operators/string-operators.md @@ -27,7 +27,7 @@ a: | cat ``` -Using `$( exp )` wont work, as it will trim the trailing new line. +Using `$( exp )` wont work, as it will trim the trailing newline. ``` m=$(echo "cat\n") yq -n '.a = strenv(m)' @@ -49,7 +49,7 @@ a: | cat ``` -Similarly, if you're trying to set the content from a file, and want a trailing new line: +Similarly, if you're trying to set the content from a file, and want a trailing newline: ``` IFS= read -rd '' output < <(cat my_file) diff --git a/pkg/yqlib/encoder_properties.go b/pkg/yqlib/encoder_properties.go index e62b3f16..a8d9e6c8 100644 --- a/pkg/yqlib/encoder_properties.go +++ b/pkg/yqlib/encoder_properties.go @@ -51,7 +51,7 @@ func (pe *propertiesEncoder) PrintLeadingContent(writer io.Writer, content strin if errors.Is(errReading, io.EOF) { if readline != "" { - // the last comment we read didn't have a new line, put one in + // the last comment we read didn't have a newline, put one in if err := writeString(writer, "\n"); err != nil { return err } diff --git a/pkg/yqlib/encoder_yaml.go b/pkg/yqlib/encoder_yaml.go index ebf7ece7..315a4695 100644 --- a/pkg/yqlib/encoder_yaml.go +++ b/pkg/yqlib/encoder_yaml.go @@ -61,7 +61,7 @@ func (ye *yamlEncoder) PrintLeadingContent(writer io.Writer, content string) err if errors.Is(errReading, io.EOF) { if readline != "" { - // the last comment we read didn't have a new line, put one in + // the last comment we read didn't have a newline, put one in if err := writeString(writer, "\n"); err != nil { return err } diff --git a/pkg/yqlib/operator_encoder_decoder.go b/pkg/yqlib/operator_encoder_decoder.go index 1c9582d1..877a0902 100644 --- a/pkg/yqlib/operator_encoder_decoder.go +++ b/pkg/yqlib/operator_encoder_decoder.go @@ -79,13 +79,13 @@ func encodeOperator(d *dataTreeNavigator, context Context, expressionNode *Expre original := originalList.Front().Value.(*CandidateNode) originalNode := unwrapDoc(original.Node) - // original block did not have a new line at the end, get rid of this one too + // original block did not have a newline at the end, get rid of this one too if !endWithNewLine.MatchString(originalNode.Value) { stringValue = chomper.ReplaceAllString(stringValue, "") } } - // dont print a new line when printing json on a single line. + // dont print a newline when printing json on a single line. if (preferences.format == JSONOutputFormat && preferences.indent == 0) || preferences.format == CSVOutputFormat || preferences.format == TSVOutputFormat { diff --git a/release_notes.txt b/release_notes.txt index 073abbc9..77724693 100644 --- a/release_notes.txt +++ b/release_notes.txt @@ -27,7 +27,7 @@ 4.30.6: - Fixed xml comment in array of scalars #1465 - - Include blank new lines in leading header preprocessing #1462 + - Include blank newlines in leading header preprocessing #1462 - Added aarch64 build (#1261) - Bumped dependency versions (#1453)