Documentation

Lean.Data.Markdown.Parser.Children

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.

  • children : Array (Block.Raw s)

    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.

      • blocks : Array (Block.Raw s)

        The finished blocks.

      • pendingList? : Option (OpenList s)

        The list that is the last child so far and may still receive another item.

      Instances For

        No children.

        Equations
        Instances For

          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
            Instances For

              Makes list the pending list. A list that was pending before is finished first, as the last block.

              Equations
              Instances For

                Removes and returns the pending list when it is a list of kind.

                Equations
                Instances For

                  Whether there are no children.

                  Equations
                  Instances For