Fix YAML, closes #3172 (#3329)

* Fix yamllint errors
* Fix link
This commit is contained in:
Divay Prakash 2018-10-26 03:25:48 +05:30 committed by GitHub
parent 30cdf4b253
commit dba905ffd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,8 @@ significant newlines and indentation, like Python. Unlike Python, however,
YAML doesn't allow literal tab characters for indentation. YAML doesn't allow literal tab characters for indentation.
```yaml ```yaml
--- # document start
# Comments in YAML look like this. # Comments in YAML look like this.
################ ################
@ -83,22 +85,22 @@ a_nested_map:
# An example # An example
? - Manchester United ? - Manchester United
- Real Madrid - Real Madrid
: [ 2001-01-01, 2002-02-02 ] : [2001-01-01, 2002-02-02]
# Sequences (equivalent to lists or arrays) look like this # Sequences (equivalent to lists or arrays) look like this
# (note that the '-' counts as indentation): # (note that the '-' counts as indentation):
a_sequence: a_sequence:
- Item 1 - Item 1
- Item 2 - Item 2
- 0.5 # sequences can contain disparate types. - 0.5 # sequences can contain disparate types.
- Item 4 - Item 4
- key: value - key: value
another_key: another_value another_key: another_value
- -
- This is a sequence - This is a sequence
- inside another sequence - inside another sequence
- - - Nested sequence indicators - - - Nested sequence indicators
- can be collapsed - can be collapsed
# Since YAML is a superset of JSON, you can also write JSON-style maps and # Since YAML is a superset of JSON, you can also write JSON-style maps and
# sequences: # sequences:
@ -170,9 +172,11 @@ set2:
item1: null item1: null
item2: null item2: null
item3: null item3: null
... # document end
``` ```
### More Resources ### More Resources
+ [YAML official website](http://yaml.org/) + [YAML official website](http://yaml.org/)
+ [Online YAML Validator](http://codebeautify.org/yaml-validator) + [Online YAML Validator](http://www.yamllint.com/)