Skip to content

Commit fa392c2

Browse files
committed
Add spread to List, ListItem
Related to remarkjs/remark#364.
1 parent c54dc99 commit fa392c2

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

readme.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ interface List <: Parent {
273273
type: "list";
274274
ordered: boolean?;
275275
start: number?;
276-
loose: boolean?;
276+
spread: boolean?;
277277
children: [ListContent];
278278
}
279279
```
@@ -290,10 +290,9 @@ that the order of items is not important (when `false` or not present).
290290
If the `ordered` field is `true`, a `start` field can be present.
291291
It represents the starting number of the node.
292292

293-
A `loose` field can be present.
293+
A `spread` field can be present.
294294
It represents that any of its items is separated by a blank line from its
295-
[siblings][term-sibling] or contains two or more [_children_][term-child]
296-
(when `true`), or not (when `false` or not present).
295+
[siblings][term-sibling] (when `true`), or not (when `false` or not present).
297296

298297
For example, the following markdown:
299298

@@ -308,10 +307,11 @@ Yields:
308307
type: 'list',
309308
ordered: true,
310309
start: 1,
311-
loose: false,
310+
spread: false,
312311
children: [{
313312
type: 'listItem',
314313
checked: true,
314+
spread: false,
315315
children: [{
316316
type: 'paragraph',
317317
children: [{type: 'text', value: 'foo'}]
@@ -326,6 +326,7 @@ Yields:
326326
interface ListItem <: Parent {
327327
type: "listItem";
328328
checked: boolean?;
329+
spread: boolean?;
329330
children: [BlockContent];
330331
}
331332
```
@@ -340,6 +341,10 @@ A `checked` field can be present.
340341
It represents whether the item is done (when `true`), not done (when `false`),
341342
or indeterminate or not applicable (when `null` or not present).
342343

344+
A `spread` field can be present.
345+
It represents that the item contains two or more [_children_][term-child]
346+
separated by a blank line (when `true`), or not (when `false` or not present).
347+
343348
For example, the following markdown:
344349

345350
```markdown
@@ -352,6 +357,7 @@ Yields:
352357
{
353358
type: 'listItem',
354359
checked: true,
360+
spread: false,
355361
children: [{
356362
type: 'paragraph',
357363
children: [{type: 'text', value: 'bar'}]

0 commit comments

Comments
 (0)