Added basic syntax for dictionaries and lists (#1947)
This commit is contained in:
parent
cd02bb5a2c
commit
5efbf15d4f
37
yaml.md
37
yaml.md
|
@ -5,12 +5,45 @@ layout: 2017/sheet
|
||||||
prism_languages: [yaml]
|
prism_languages: [yaml]
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### Dictionaries and lists
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# comments start with "#"
|
||||||
|
# dictionary are written like "key: value"
|
||||||
|
name: Martin D'vloper
|
||||||
|
languages:
|
||||||
|
perl: Elite
|
||||||
|
python: Elite
|
||||||
|
pascal: Lame
|
||||||
|
|
||||||
|
# list items beginn with a "- "
|
||||||
|
foods:
|
||||||
|
- Apple
|
||||||
|
- Orange
|
||||||
|
- Strawberry
|
||||||
|
- Mango
|
||||||
|
|
||||||
|
# booleans are lower case
|
||||||
|
employed: true
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Multiline strings
|
### Multiline strings
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
# Literal Block Scalar
|
||||||
Multiline: |
|
Multiline: |
|
||||||
hello
|
exactly as you see
|
||||||
world
|
will appear these three
|
||||||
|
lines of poetry
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Folded Block Scalar
|
||||||
|
Multiline: <
|
||||||
|
this is really a
|
||||||
|
single line of text
|
||||||
|
despite appearances
|
||||||
```
|
```
|
||||||
|
|
||||||
### Inheritance
|
### Inheritance
|
||||||
|
|
Loading…
Reference in New Issue