Documentation
¶
Overview ¶
Package markdown parses the release notes of the update window. It knows what changelogs use: headings, paragraphs, nested lists, block quotes, fenced code, rules, emphasis, code spans and links. Everything else is text: raw HTML stays text, and links only go to http, https and mailto URLs, so notes cannot run code in the window.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
type Block struct {
Kind BlockKind
// Level is the level of a heading, from 1 to 6.
Level int
// Inlines are the text of a paragraph or heading.
Inlines []Inline
// Text is the text of fenced code.
Text string
// Ordered is set for a numbered list, whose Items hold the blocks of
// each item; Blocks are those of a quote.
Ordered bool
Items [][]Block
Blocks []Block
}
Block is a block of release notes.
type Inline ¶
type Inline struct {
Kind InlineKind
// Text is the text of a Text or CodeSpan.
Text string
// Children are the text of an Emphasis, Strong or Link.
Children []Inline
// URL is where a Link goes: an http, https or mailto URL.
URL string
}
Inline is a run of text in a paragraph or heading.
type InlineKind ¶
type InlineKind uint8
InlineKind is what an Inline is.
const ( Text InlineKind = iota CodeSpan Emphasis Strong Link )