Skip to content

Commit e719eeb

Browse files
committed
Update multiline string examples and formatting adjustments
1 parent 76b1bb5 commit e719eeb

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

spec/v0.1.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Commas are optional. Trailing comma is allowed.
9191

9292
```maml
9393
{
94-
key: "value",
95-
"quotted key": "value",
94+
foo: "value",
95+
bar: "value",
9696
}
9797
```
9898

@@ -166,7 +166,7 @@ the lazy dog.
166166
}
167167
```
168168

169-
In the previous example, a string ends with a newline at the end.
169+
In the previous example, a string ends with a newline at the end:
170170

171171
```maml
172172
"The quick brown\nfox jumps over\nthe lazy dog.\n"
@@ -181,13 +181,23 @@ fox jumps over
181181
the lazy dog."""
182182
```
183183

184-
You can write one or two quotes anywhere within a multiline string,
185-
but sequences of three or more quotes are not permitted.
184+
All whitespaces are preserved as is.
186185

187186
```maml
188-
"""
189-
Maximum of two "" quotes allowed inside.
190-
"""
187+
{
188+
key: """
189+
Roses are red,
190+
Violets are blue;
191+
"""
192+
}
193+
```
194+
195+
The previous example can be written as:
196+
197+
```maml
198+
{
199+
key: " Roses are red,\n Violets are blue;\n "
200+
}
191201
```
192202

193203
All escape sequences are preserved as is.
@@ -199,6 +209,16 @@ are interpreted as-is without modification.
199209
"""
200210
```
201211

212+
You can write one or two quotes anywhere within a multiline string,
213+
but sequences of three or more quotes are not permitted.
214+
215+
```maml
216+
"""
217+
Maximum of two "" quotes allowed inside.
218+
But many if spaces: "1", "2", "3".
219+
"""
220+
```
221+
202222
Multiline string may also be written in a single line.
203223

204224
```maml

0 commit comments

Comments
 (0)