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

Heading

mattt edited this page Jan 22, 2020 · 11 revisions

Heading

A heading.

public final class Heading: Node

From the CommonMark Spec:

An ATX heading consists of a string of characters, parsed as inline content, between an opening sequence of 1–6 unescaped # characters and an optional closing sequence of any number of unescaped # characters. The opening sequence of # characters must be followed by a space or by the end of line. The optional closing sequence of #s must be preceded by a space and may be followed by spaces only. The opening # character may be indented 0-3 spaces. The raw contents of the heading are stripped of leading and trailing spaces before being parsed as inline content. The heading level is equal to the number of # characters in the opening sequence.

A setext heading consists of one or more lines of text, each containing at least one non-whitespace character, with no more than 3 spaces indentation, followed by a setext heading underline. The lines of text must be such that, were they not followed by the setext heading underline, they would be interpreted as a paragraph: they cannot be interpretable as a code fence, ATX heading, block quote, thematic break, list item, or HTML block.


Inheritance

Node, CustomStringConvertible, Hashable


Properties

headerLevel

var headerLevel: Int

description

var description: String

Methods

hash(into:)

public func hash(into hasher: inout Hasher)
Clone this wiki locally