Change "new line" to "newline"

This commit is contained in:
neuroevolutus 2023-03-12 13:33:44 -05:00
parent c9a4540c5f
commit 3399f1fa01
6 changed files with 9 additions and 9 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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
}

View File

@ -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
}

View File

@ -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 {

View File

@ -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)