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

CodeBlock

mattt edited this page Apr 10, 2020 · 11 revisions

CodeBlock

A code block.

public final class CodeBlock: Node

From the CommonMark Spec:

An indented code block is composed of one or more indented chunks separated by blank lines. An indented chunk is a sequence of non-blank lines, each indented four or more spaces. The contents of the code block are the literal contents of the lines, including trailing line endings, minus four spaces of indentation. An indented code block has no info string.

A code fence is a sequence of at least three consecutive backtick characters (`) or tildes (~). (Tildes and backticks cannot be mixed.) A fenced code block begins with a code fence, indented no more than three spaces.

Inheritance

Node

Initializers

init(literal:)

public convenience init(literal: String? = nil)

init(literal:fenceInfo:)

public convenience init(literal: String, fenceInfo: String? = nil)

init(_:)

public convenience init(_ closure: () -> String)

init(_:_:)

public convenience init(_ fenceInfo: String, _ builder: () -> String)

Properties

cmark_node_type

var cmark_node_type: cmark_node_type

fenceInfo

var fenceInfo: String?
Clone this wiki locally