Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

ContainerOfBlocks

mattt edited this page Feb 7, 2020 · 9 revisions

Children.CMarkNodeChildIterator.ContainerOfBlocks

public protocol ContainerOfBlocks: Node

Inheritance

Node

Conforming Types

Children.CMarkNodeChildIterator.ContainerOfBlocks.Document.BlockQuote.ContainerOfBlocks.ContainerOfInlineElements

Requirements

insert(child:before:)

Inserts a block to the block's children before a specified sibling.

@discardableResult public func insert(child: Block & Node, before sibling: Block & Node) -> Bool

Parameters

  • child: The block to add.
  • sibling: The child before which the block is added

Returns

true if successful, otherwise false.

insert(child:after:)

Inserts a block to the block's children after a specified sibling.

@discardableResult public func insert(child: Block & Node, after sibling: Block & Node) -> Bool

Parameters

  • child: The block to add.
  • sibling: The child after which the block is added

Returns

true if successful, otherwise false.

ContainerOfInlineElements

public protocol ContainerOfInlineElements: Node

remove(child:)

Removes a block from the block's children.

@discardableResult public func remove(child: Block & Node) -> Bool

Parameters

  • child: The block to remove.

Returns

true if successful, otherwise false.

children

The block's children.

var children: [Block & Node]

append(child:)

Adds a block to the end of the block's children.

@discardableResult public func append(child: Block & Node) -> Bool

Parameters

  • child: The block to add.

Returns

true if successful, otherwise false.

prepend(child:)

Adds a block to the beginning of the block's children.

@discardableResult public func prepend(child: Block & Node) -> Bool

Parameters

  • child: The block to add.

Returns

true if successful, otherwise false.

Clone this wiki locally