From dba905ffd2929ac78509d019bc8b609699ee11cb Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Fri, 26 Oct 2018 03:25:48 +0530 Subject: Fix YAML, closes #3172 (#3329) * Fix yamllint errors * Fix link --- yaml.html.markdown | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'yaml.html.markdown') diff --git a/yaml.html.markdown b/yaml.html.markdown index 52658453..ab0f9d55 100644 --- a/yaml.html.markdown +++ b/yaml.html.markdown @@ -14,6 +14,8 @@ significant newlines and indentation, like Python. Unlike Python, however, YAML doesn't allow literal tab characters for indentation. ```yaml +--- # document start + # Comments in YAML look like this. ################ @@ -83,22 +85,22 @@ a_nested_map: # An example ? - Manchester United - Real Madrid -: [ 2001-01-01, 2002-02-02 ] +: [2001-01-01, 2002-02-02] # Sequences (equivalent to lists or arrays) look like this # (note that the '-' counts as indentation): a_sequence: -- Item 1 -- Item 2 -- 0.5 # sequences can contain disparate types. -- Item 4 -- key: value - another_key: another_value -- - - This is a sequence - - inside another sequence -- - - Nested sequence indicators - - can be collapsed + - Item 1 + - Item 2 + - 0.5 # sequences can contain disparate types. + - Item 4 + - key: value + another_key: another_value + - + - This is a sequence + - inside another sequence + - - - Nested sequence indicators + - can be collapsed # Since YAML is a superset of JSON, you can also write JSON-style maps and # sequences: @@ -170,9 +172,11 @@ set2: item1: null item2: null item3: null + +... # document end ``` ### More Resources + [YAML official website](http://yaml.org/) -+ [Online YAML Validator](http://codebeautify.org/yaml-validator) ++ [Online YAML Validator](http://www.yamllint.com/) -- cgit v1.2.3 From 62e9ea6b71d7c2cbb7b408f17fba32d355ea43ba Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Sat, 27 Oct 2018 18:16:06 +0530 Subject: Explain regexp, closes #2197 --- yaml.html.markdown | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'yaml.html.markdown') diff --git a/yaml.html.markdown b/yaml.html.markdown index ab0f9d55..d51b2147 100644 --- a/yaml.html.markdown +++ b/yaml.html.markdown @@ -121,6 +121,10 @@ other_anchor: *anchor_name base: &base name: Everyone has same name +# The regexp << is called Merge Key Language-Independent Type. It is is used to +# indicate that all the keys of one or more specified maps should be inserted +# into the current map. + foo: &foo <<: *base age: 10 -- cgit v1.2.3 From 699ab98187ba01da8cf2874ef9048139a6727b5f Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Sat, 27 Oct 2018 18:32:40 +0530 Subject: Correct wording, closes #3098 --- yaml.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaml.html.markdown') diff --git a/yaml.html.markdown b/yaml.html.markdown index d51b2147..8683971e 100644 --- a/yaml.html.markdown +++ b/yaml.html.markdown @@ -171,7 +171,7 @@ set: ? item3 or: {item1, item2, item3} -# Like Python, sets are just maps with null values; the above is equivalent to: +# Sets are just maps with null values; the above is equivalent to: set2: item1: null item2: null -- cgit v1.2.3 From ef4106486f94fb8273e27a8aab0babc4324a3e20 Mon Sep 17 00:00:00 2001 From: Rohith Reddy Kumbharkar <5032439+rohith@users.noreply.github.com> Date: Fri, 7 Dec 2018 20:48:37 +0530 Subject: Removed duplicate **is** --- yaml.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaml.html.markdown') diff --git a/yaml.html.markdown b/yaml.html.markdown index 8683971e..09c5dfc5 100644 --- a/yaml.html.markdown +++ b/yaml.html.markdown @@ -121,7 +121,7 @@ other_anchor: *anchor_name base: &base name: Everyone has same name -# The regexp << is called Merge Key Language-Independent Type. It is is used to +# The regexp << is called Merge Key Language-Independent Type. It is used to # indicate that all the keys of one or more specified maps should be inserted # into the current map. -- cgit v1.2.3 From f2b4df9a8e57406212101fc17be05c1a5858a1b3 Mon Sep 17 00:00:00 2001 From: Peter Uithoven Date: Fri, 5 Jul 2019 17:09:05 +0200 Subject: UTF-8/16/32 characters need to be encoded --- yaml.html.markdown | 2 ++ 1 file changed, 2 insertions(+) (limited to 'yaml.html.markdown') diff --git a/yaml.html.markdown b/yaml.html.markdown index 09c5dfc5..f1393c09 100644 --- a/yaml.html.markdown +++ b/yaml.html.markdown @@ -38,6 +38,8 @@ however: 'A string, enclosed in quotes.' 'Keys can be quoted too.': "Useful if you want to put a ':' in your key." single quotes: 'have ''one'' escape pattern' double quotes: "have many: \", \0, \t, \u263A, \x0d\x0a == \r\n, and more." +# UTF-8/16/32 characters need to be encoded +Superscript two: \u00B2 # Multiple-line strings can be written either as a 'literal block' (using |), # or a 'folded block' (using '>'). -- cgit v1.2.3