Added comment operator examples

This commit is contained in:
Mike Farah 2022-09-30 11:30:31 +10:00
parent 60f30f8a48
commit 7f4c8e1c78
2 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,7 @@ will output
fc: ""
```
## Retreive comment - map key example
## Retrieve comment - map key example
From the previous example, we know that the comment is on the 'hello' _key_ as a lineComment
Given a sample.yml file of:
@ -163,7 +163,7 @@ will output
fc: ""
```
## Retreive comment - array example
## Retrieve comment - array example
From the previous example, we know that the comment is on the first child as a headComment
Given a sample.yml file of:

View File

@ -115,7 +115,7 @@ var commentOperatorScenarios = []expressionScenario{
},
},
{
description: "Retreive comment - map key example",
description: "Retrieve comment - map key example",
subdescription: "From the previous example, we know that the comment is on the 'hello' _key_ as a lineComment",
document: "hello: # hello-world-comment\n message: world",
expression: `.hello | key | line_comment`,
@ -133,7 +133,7 @@ var commentOperatorScenarios = []expressionScenario{
},
},
{
description: "Retreive comment - array example",
description: "Retrieve comment - array example",
subdescription: "From the previous example, we know that the comment is on the first child as a headComment",
document: "name:\n # under-name-comment\n - first-array-child",
expression: `.name[0] | headComment`,