Skip to content

Commit 7f4c8e1

Browse files
committed
Added comment operator examples
1 parent 60f30f8 commit 7f4c8e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/yqlib/doc/operators/comment-operators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ will output
108108
fc: ""
109109
```
110110
111-
## Retreive comment - map key example
111+
## Retrieve comment - map key example
112112
From the previous example, we know that the comment is on the 'hello' _key_ as a lineComment
113113
114114
Given a sample.yml file of:
@@ -163,7 +163,7 @@ will output
163163
fc: ""
164164
```
165165
166-
## Retreive comment - array example
166+
## Retrieve comment - array example
167167
From the previous example, we know that the comment is on the first child as a headComment
168168
169169
Given a sample.yml file of:

pkg/yqlib/operator_comments_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ var commentOperatorScenarios = []expressionScenario{
115115
},
116116
},
117117
{
118-
description: "Retreive comment - map key example",
118+
description: "Retrieve comment - map key example",
119119
subdescription: "From the previous example, we know that the comment is on the 'hello' _key_ as a lineComment",
120120
document: "hello: # hello-world-comment\n message: world",
121121
expression: `.hello | key | line_comment`,
@@ -133,7 +133,7 @@ var commentOperatorScenarios = []expressionScenario{
133133
},
134134
},
135135
{
136-
description: "Retreive comment - array example",
136+
description: "Retrieve comment - array example",
137137
subdescription: "From the previous example, we know that the comment is on the first child as a headComment",
138138
document: "name:\n # under-name-comment\n - first-array-child",
139139
expression: `.name[0] | headComment`,

0 commit comments

Comments
 (0)