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

Document

mattt edited this page Jan 14, 2021 · 13 revisions

Document

A CommonMark document.

public final class Document: Node

Inheritance

Node, Visitable

Initializers

init(_:options:)

Creates a document from a CommonMark string.

public convenience init(_ commonmark: String, options: ParsingOptions = []) throws

Parameters

  • commonmark: A CommonMark string.

Throws

  • Document.Error.invalid if a document couldn't be constructed with the provided source.

init(children:)

public convenience init(children: [Block & Node] = [])

init(_:)

public convenience init(_ builder: () -> BlockConvertible)

Methods

accept(visitor:)

public func accept<T: Visitor>(visitor: T)
Clone this wiki locally