Skip to content

Commit 72507e0

Browse files
tlordingydotnet
authored andcommitted
www: Update yaml.md
Small changes for clarity: hyphenations, etc.
1 parent 193bba3 commit 72507e0

1 file changed

Lines changed: 20 additions & 21 deletions

File tree

doc/yaml.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ data.
99

1010
Modern programmers generally have a decent understanding of YAML basics as it
1111
ends up in many places in the tech world.
12-
That said, there are many lesser well-known YAML concepts and features and
12+
That said, there are many lesser-known YAML concepts and features, and
1313
YS makes use of most of them.
1414

1515
Remember, all valid YS is required to be valid YAML syntax.
@@ -155,38 +155,38 @@ plain:
155155
- I can also span multiple lines
156156
where whitespace beteween lines
157157
folds to a single space
158-
single quoted:
159-
- 'I''m single quoted'
158+
single-quoted:
159+
- 'I''m single-quoted'
160160
- 'I have one thing that is escapable,
161161
the single quote itself '' which
162162
is escaped by doubling it'
163-
- 'Multiline single quoted scalars
164-
fold the same way as plain'
165-
double quoted:
166-
- "I'm double quoted"
163+
- 'Multiline single-quoted scalars
164+
fold the same way as plain ones'
165+
double-quoted:
166+
- "I'm double-quoted"
167167
- "I'm the only style capable of encoding
168-
any possible string value"
169-
- "I have lots of escapes like \n and \t
170-
and also \" and \\"
171-
- "Multiline double quoted scalars
172-
fold the same way as plain"
168+
all possible string values"
169+
- "I have lots of escape sequences, like \n and \t
170+
as well as \" and \\"
171+
- "Multiline double-quoted scalars
172+
fold the same way as plain ones do"
173173
literal: |
174174
I'm like a heredoc in Shell or Perl.
175175
176176
But my scope is determined by indentation.
177177
Newlines are preserved as you would expect
178178
from a heredoc.
179179
folded: >
180-
Folded scalars pretty much fold like
180+
Folded scalars fold pretty much like
181181
the others, but you can use them without
182182
worry of ` #` or `: ` being special.
183183
184184
They are the most rarely used scalar style.
185185
186186
In YS code mode:
187187
- plain: Used for code expressions
188-
- single quoted: Used for character strings
189-
- double quoted: Used for strings with interpolation support
188+
- single-quoted: Used for character strings
189+
- double-quoted: Used for strings with interpolation support
190190
- literal: Used for template strings including interpolation
191191
- folded: Not allowed in code mode
192192

@@ -198,9 +198,9 @@ In YS code mode:
198198

199199

200200
# Here we start a second document in the stream.
201-
# This one is a top level sequence and it has an anchor and a tag:
201+
# This one is a top-level sequence and it has an anchor and a tag:
202202
# The `---` indicator is required and you can also use the line to specify the
203-
# anchor and tag for the top level node.
203+
# anchor and tag for the top-level node.
204204

205205
--- &my-seq-1 !a-tag
206206

@@ -244,8 +244,7 @@ In YS code mode:
244244
# like JSON.
245245
# YAML uses curly braces for mappings and square brackets for sequences.
246246
# These are called "flow style" for "collections".
247-
# The normal indented style we've been using is called "block style" by
248-
# comparison.
247+
# By comparison, the normal indented style we've been using is called "block style".
249248
# Note: A YAML "collection" is the generic term for a node that is either a
250249
# mapping or a sequence.
251250

@@ -259,7 +258,7 @@ key 2: [red, blue,
259258
empty mapping: {}
260259
empty sequence: []
261260

262-
# There is actually no way to write empty collections in block style.
261+
# Note, there is no way to write empty collections in block style.
263262
```
264263

265264

@@ -269,7 +268,7 @@ Here's a few YAML syntax variants that you won't see very often.
269268
Some of these are used in YS, so it's good to know about them.
270269

271270
```
272-
# YAML has a top level "directive" syntax.
271+
# YAML has a top-level "directive" syntax.
273272
# There are only 2 directives defined by the YAML 1.2 specification:
274273
# This is the first one, the "YAML directive".
275274
# It simply specifies the version of the YAML specification in play.

0 commit comments

Comments
 (0)