From 5efbf15d4fddaa334c370ca3796f4a9f0ebd6fb7 Mon Sep 17 00:00:00 2001 From: TheDarkTron Date: Tue, 31 Jan 2023 09:54:45 +0100 Subject: [PATCH] Added basic syntax for dictionaries and lists (#1947) --- yaml.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/yaml.md b/yaml.md index c0182ad60..cac8d4e16 100644 --- a/yaml.md +++ b/yaml.md @@ -5,12 +5,45 @@ layout: 2017/sheet 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 ```yaml +# Literal Block Scalar Multiline: | - hello - world + exactly as you see + will appear these three + lines of poetry +``` + +```yaml +# Folded Block Scalar +Multiline: < + this is really a + single line of text + despite appearances ``` ### Inheritance