Container Children #
The children of a container while the block structure is being parsed. A list whose last item has
closed may still receive another item, so it is kept apart from the finished blocks until the next
line, which determines whether it continues. The constructor of Children is private to protect
invariants. Because push is the only operation that appends a block, and it finishes the pending
list first, a block never ends up before the list that precedes it.
A list item that has been closed inside its list.
- marker : s.Subslice
The item's bullet or ordered marker.
The item's blocks, in source order.
Instances For
A list that may still receive items.
- kind : ListKind
The kind of the list.
- loose : Bool
Whether a blank line has been encountered between two blocks of the list, which makes it loose (CommonMark §5.3).
- items : Array (ClosedItem s)
The items that have been closed, in source order.
Instances For
The closed children of a container, in source order.
When a list item closes, its list is not finished. The next line that begins with a marker of the
same kind adds another item to it. While still open, the list is saved in pendingList?. It becomes
the last element of blocks when closed.
The finished blocks.
The list that is the last child so far and may still receive another item.
Instances For
No children.
Instances For
Equations
- Lean.Markdown.Children.instEmptyCollection = { emptyCollection := Lean.Markdown.Children.empty }
Equations
Finishes the pending list, if there is one, as the last block.
Equations
- One or more equations did not get rendered due to their size.
- c.flushLists = c
Instances For
Adds b after the children so far. Any pending lists are closed first.
Equations
- c.push b = have c := c.flushLists; { blocks := c.blocks.push b, pendingList? := c.pendingList? }
Instances For
Makes list the pending list. A list that was pending before is finished first, as the last block.
Equations
- c.setPendingList list = have __src := c.flushLists; { blocks := __src.blocks, pendingList? := some list }
Instances For
Removes and returns the pending list when it is a list of kind.
Equations
Instances For
Whether there are no children.