commit 641f806c7892890bdc2ae638a9dcd0ca9d2d1a8a
parent c147adf5d85e447859b2f531e43730ff2f37936a
Author: Byron Torres <b@torresjrjr.com>
Date: Fri, 3 Dec 2021 01:55:15 +0000
ignore inline surrounding whitespace
Diffstat:
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/README.md b/README.md
@@ -19,8 +19,8 @@ Example:
.type: Gemini Guidance Computer
.stat::
.frequency: 7.143 kHz
- .power: 26 V DC
- .weight: 26.75 kg
+ .power: 26 V DC
+ .weight: 26.75 kg
.reference system: barycentric celestial
.equinox: J2000.0 SOL
diff --git a/exapmles/gemini.nest b/exapmles/gemini.nest
@@ -4,8 +4,8 @@
.type: Gemini Guidance Computer
.stat::
.frequency: 7.143 kHz
- .power: 26 V DC
- .weight: 26.75 kg
+ .power: 26 V DC
+ .weight: 26.75 kg
.reference system: barycentric celestial
.equinox: J2000.0 SOL
diff --git a/tutorial.md b/tutorial.md
@@ -26,9 +26,9 @@ to denote the end of a block is permitted.
There are three block types: the map, sequence, and textwall.
A textwall represents a multilined string scalar. Each line is prefixed
-with a pipe (`|`). The concatenation of each line, excluding the pipe
-prefix and including the terminating newline character, form the scalar
-string.
+with a pipe (`|`). The string scalar is equivalent to the textwall,
+excluding the pipe prefixes and including the terminating newline
+characters.
Example of a textwall:
@@ -45,10 +45,9 @@ JSON equivalent:
"Station:\n\nβ Hyi\tType circumpolar\tDistance 24.33ly\n"
A sequence holds elements, each either prefixed with a dash-space (`- `)
-for inline values, or a double-dash (`--`) for nested values. Inline
-string values start from the first character after the dash-space up to
-and excluding the line's terminating newline character. Any element
-without an inline or nested value is considered an empty string.
+for inline values, or preceded with a dash-dash (`--`) line for nested
+values. Whitespace surrounding inline string values is ignored. Any
+absent value, inline or nested, is considered an empty string.
Example of a sequence, with a nested sequence:
@@ -61,7 +60,7 @@ Example of a sequence, with a nested sequence:
.
-
--
- - Barycentric Celestial
+ - Barycentric Celestial
.
JSON equivalent:
@@ -75,14 +74,15 @@ JSON equivalent:
],
"",
"",
- " Barycentric Celestial "
+ "Barycentric Celestial"
]
A map holds key-value pairs, each prefixed with a single period (`.`).
Keys are terminated with a colon-space (`: `) for inline values, or
-double-colon (`::`) for nested values. Whitespace between these
-signifiers and key strings is ignored. Inline string values are
-represented similarly as in sequences.
+colon-colon (`::`) for nested values. Whitespace between these
+signifiers and key strings is ignored. Whitespace surrounding inline
+string values is ignored. Any absent value, inline or nested, is
+considered an empty string.
An example of a map, with one nested map:
@@ -95,7 +95,7 @@ An example of a map, with one nested map:
.reference system: barycentric celestial
.alpha:
.omega::
- . equinox : J2000.0 SOL
+ . equinox : J2000.0 SOL
. : Christopher Null
.
@@ -110,7 +110,7 @@ JSON equivalent:
"reference system": "barycentric celestial",
"alpha": "",
"omega": "",
- "equinox": " J2000.0 SOL ",
+ "equinox": "J2000.0 SOL",
"": "Christopher Null"
}