Skip to content

Commit e0eef59

Browse files
committed
Clarify empty multiline string behavior
1 parent 9d54141 commit e0eef59

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

spec/v0.1.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Objectives
1313
2. MAML should be easily readable by humans.
1414
3. MAML should be easily parsed by machines.
1515

16-
1716
Spec
1817
----
1918

@@ -72,7 +71,6 @@ Commas are optional. Trailing comma is allowed.
7271
[ "red", "yellow", "green", ]
7372
```
7473

75-
7674
Objects
7775
-------
7876

@@ -225,6 +223,25 @@ Multiline string may also be written in a single line.
225223
"""A multiline string and with "quotas"."""
226224
```
227225

226+
The following example evaluates to the empty string `""`:
227+
228+
```maml
229+
"""
230+
"""
231+
```
232+
233+
If you want a string that contains exactly one newline character, insert one
234+
additional blank line between the delimiters:
235+
236+
```maml
237+
"""
238+
239+
"""
240+
```
241+
242+
The single-line multiline string cannot represent an empty string. To write an
243+
empty string on one line, use a normal string `""`.
244+
228245
All multiline strings must contain only valid UTF-8 characters.
229246

230247

@@ -292,7 +309,6 @@ Booleans are `true` and `false`. Always lowercase.
292309
[ true, false ]
293310
```
294311

295-
296312
Null
297313
----
298314

@@ -303,7 +319,6 @@ valid and different from not having that key in the object. Always lowercase.
303319
null
304320
```
305321

306-
307322
Filename Extension
308323
------------------
309324

@@ -323,7 +338,7 @@ ABNF Grammar
323338
A formal description of MAML's syntax in ABNF format
324339
([RFC 5234](https://www.ietf.org/rfc/rfc5234.txt)).
325340

326-
A visual representation of the MAML syntax is available in the
341+
A visual representation of the MAML syntax is available in the
327342
[syntax diagram](/spec/v0.1/diagram.md).
328343

329344
<<< @/spec/v0.1/maml.abnf

0 commit comments

Comments
 (0)