-
Notifications
You must be signed in to change notification settings - Fork 10
List_Item
public final class Item: Node
Node
, Visitable
, ListItemConvertible
public convenience init(children: [Inline & Node] = [])
public convenience init(children: [Block & Node] = [])
public convenience init(_ closure: () -> String)
public convenience init(_ builder: () -> BlockConvertible)
The elements contained by the list item.
var children: [Node]
var listItemValue: [List.Item]
Adds a node to the beginning of the list item's children.
@discardableResult public func prepend(child: Node) -> Bool
- child: The node to add.
true
if successful, otherwise false
.
Adds a node to the end of the list item's children.
@discardableResult public func append(child: Node) -> Bool
- child: The node to add.
true
if successful, otherwise false
.
Inserts a node to the list item's children before a specified sibling.
@discardableResult public func insert(child: Node, before sibling: Node) -> Bool
- child: The node to add.
- sibling: The child before which the node is added
true
if successful, otherwise false
.
Inserts a node to the list item's children after a specified sibling.
@discardableResult public func insert(child: Node, after sibling: Node) -> Bool
- child: The node to add.
- sibling: The child after which the node is added
true
if successful, otherwise false
.
Replaces a node with a specified node.
@discardableResult public func replace(child: Node, with replacement: Node) -> Bool
- child: The node to replace.
- replacement: The node to replace the existing node.
true
if successful, otherwise false
.
Removes a node from the list item's children.
@discardableResult public func remove(child: Node) -> Bool
- child: The node to remove.
true
if successful, otherwise false
.
Removes and returns the list item's children.
public func removeChildren() -> [Node]
An array of nodes.
public func accept<T: Visitor>(visitor: T)
Generated at 2021-03-03T19:19:22+0000 using swift-doc 1.0.0-beta.5.
Types
- BlockQuote
- Code
- CodeBlock
- CommonMarkBuilder
- Document
- Document.Error
- Document.ParsingOptions
- Document.Position
- Emphasis
- ForEach
- Fragment
- HTMLBlock
- HardLineBreak
- Heading
- Image
- Link
- List
- List.Delimiter
- List.Item
- List.Kind
- Node
- Node.RenderingFormat
- Node.RenderingOptions
- Paragraph
- RawHTML
- Section
- SoftLineBreak
- StringBuilder
- Strong
- Text
- ThematicBreak
- VisitorContinueKind