Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.
mattt edited this page Feb 7, 2020 · 11 revisions

Node

A CommonMark node.

open class Node

Initializers

init()

convenience init()

init(_:)

Creates a node from a cmark_node pointer.

init(_ cmark_node: OpaquePointer)

init(nonrecursively:)

convenience init(nonrecursively: Void)

Properties

cmark_node

A pointer to the underlying cmark_node for the node.

let cmark_node: OpaquePointer

managed

Whether the underlying cmark_node should be freed upon deallocation.

var managed: Bool = false

range

The line and column range of the element in the document.

var range: ClosedRange<Document.Position>

description

var description: String

parent

The parent of the element, if any.

var parent: Node?

cmark_node_type

var cmark_node_type: cmark_node_type

Methods

hash(into:)

public func hash(into hasher: inout Hasher)

create(for:)

Creates and returns the Node subclass corresponding to the type of a cmark_node pointer.

static func create(for cmark_node: OpaquePointer!) -> Node?

Returns

An instance of a Node subclass.

==(lhs:rhs:)

public static func ==(lhs: Node, rhs: Node) -> Bool
Clone this wiki locally