...

Package ast

import "github.com/yuin/goldmark/extension/ast"
Overview
Index

Overview ▾

Package ast defines AST nodes that represents extension's elements

Index ▾

Variables
type Alignment
    func (a Alignment) String() string
type DefinitionDescription
    func NewDefinitionDescription() *DefinitionDescription
    func (n *DefinitionDescription) Dump(source []byte, level int)
    func (n *DefinitionDescription) Kind() gast.NodeKind
type DefinitionList
    func NewDefinitionList(offset int, para *gast.Paragraph) *DefinitionList
    func (n *DefinitionList) Dump(source []byte, level int)
    func (n *DefinitionList) Kind() gast.NodeKind
type DefinitionTerm
    func NewDefinitionTerm() *DefinitionTerm
    func (n *DefinitionTerm) Dump(source []byte, level int)
    func (n *DefinitionTerm) Kind() gast.NodeKind
type Footnote
    func NewFootnote(ref []byte) *Footnote
    func (n *Footnote) Dump(source []byte, level int)
    func (n *Footnote) Kind() gast.NodeKind
type FootnoteBacklink
    func NewFootnoteBacklink(index int) *FootnoteBacklink
    func (n *FootnoteBacklink) Dump(source []byte, level int)
    func (n *FootnoteBacklink) Kind() gast.NodeKind
type FootnoteLink
    func NewFootnoteLink(index int) *FootnoteLink
    func (n *FootnoteLink) Dump(source []byte, level int)
    func (n *FootnoteLink) Kind() gast.NodeKind
type FootnoteList
    func NewFootnoteList() *FootnoteList
    func (n *FootnoteList) Dump(source []byte, level int)
    func (n *FootnoteList) Kind() gast.NodeKind
type Strikethrough
    func NewStrikethrough() *Strikethrough
    func (n *Strikethrough) Dump(source []byte, level int)
    func (n *Strikethrough) Kind() gast.NodeKind
type Table
    func NewTable() *Table
    func (n *Table) Dump(source []byte, level int)
    func (n *Table) Kind() gast.NodeKind
type TableCell
    func NewTableCell() *TableCell
    func (n *TableCell) Dump(source []byte, level int)
    func (n *TableCell) Kind() gast.NodeKind
type TableHeader
    func NewTableHeader(row *TableRow) *TableHeader
    func (n *TableHeader) Dump(source []byte, level int)
    func (n *TableHeader) Kind() gast.NodeKind
type TableRow
    func NewTableRow(alignments []Alignment) *TableRow
    func (n *TableRow) Dump(source []byte, level int)
    func (n *TableRow) Kind() gast.NodeKind
type TaskCheckBox
    func NewTaskCheckBox(checked bool) *TaskCheckBox
    func (n *TaskCheckBox) Dump(source []byte, level int)
    func (n *TaskCheckBox) Kind() gast.NodeKind

Package files

definition_list.go footnote.go strikethrough.go table.go tasklist.go

Variables

KindDefinitionDescription is a NodeKind of the DefinitionDescription node.

var KindDefinitionDescription = gast.NewNodeKind("DefinitionDescription")

KindDefinitionList is a NodeKind of the DefinitionList node.

var KindDefinitionList = gast.NewNodeKind("DefinitionList")

KindDefinitionTerm is a NodeKind of the DefinitionTerm node.

var KindDefinitionTerm = gast.NewNodeKind("DefinitionTerm")

KindFootnote is a NodeKind of the Footnote node.

var KindFootnote = gast.NewNodeKind("Footnote")

KindFootnoteBacklink is a NodeKind of the FootnoteBacklink node.

var KindFootnoteBacklink = gast.NewNodeKind("FootnoteBacklink")

KindFootnoteLink is a NodeKind of the FootnoteLink node.

var KindFootnoteLink = gast.NewNodeKind("FootnoteLink")

KindFootnoteList is a NodeKind of the FootnoteList node.

var KindFootnoteList = gast.NewNodeKind("FootnoteList")

KindStrikethrough is a NodeKind of the Strikethrough node.

var KindStrikethrough = gast.NewNodeKind("Strikethrough")

KindTable is a NodeKind of the Table node.

var KindTable = gast.NewNodeKind("Table")

KindTableCell is a NodeKind of the TableCell node.

var KindTableCell = gast.NewNodeKind("TableCell")

KindTableHeader is a NodeKind of the TableHeader node.

var KindTableHeader = gast.NewNodeKind("TableHeader")

KindTableRow is a NodeKind of the TableRow node.

var KindTableRow = gast.NewNodeKind("TableRow")

KindTaskCheckBox is a NodeKind of the TaskCheckBox node.

var KindTaskCheckBox = gast.NewNodeKind("TaskCheckBox")

type Alignment

Alignment is a text alignment of table cells.

type Alignment int
const (
    // AlignLeft indicates text should be left justified.
    AlignLeft Alignment = iota + 1

    // AlignRight indicates text should be right justified.
    AlignRight

    // AlignCenter indicates text should be centered.
    AlignCenter

    // AlignNone indicates text should be aligned by default manner.
    AlignNone
)

func (Alignment) String

func (a Alignment) String() string

type DefinitionDescription

A DefinitionDescription struct represents a definition list description of Markdown (PHPMarkdownExtra) text.

type DefinitionDescription struct {
    gast.BaseBlock
    IsTight bool
}

func NewDefinitionDescription

func NewDefinitionDescription() *DefinitionDescription

NewDefinitionDescription returns a new DefinitionDescription node.

func (*DefinitionDescription) Dump

func (n *DefinitionDescription) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*DefinitionDescription) Kind

func (n *DefinitionDescription) Kind() gast.NodeKind

Kind implements Node.Kind.

type DefinitionList

A DefinitionList struct represents a definition list of Markdown (PHPMarkdownExtra) text.

type DefinitionList struct {
    gast.BaseBlock
    Offset             int
    TemporaryParagraph *gast.Paragraph
}

func NewDefinitionList

func NewDefinitionList(offset int, para *gast.Paragraph) *DefinitionList

NewDefinitionList returns a new DefinitionList node.

func (*DefinitionList) Dump

func (n *DefinitionList) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*DefinitionList) Kind

func (n *DefinitionList) Kind() gast.NodeKind

Kind implements Node.Kind.

type DefinitionTerm

A DefinitionTerm struct represents a definition list term of Markdown (PHPMarkdownExtra) text.

type DefinitionTerm struct {
    gast.BaseBlock
}

func NewDefinitionTerm

func NewDefinitionTerm() *DefinitionTerm

NewDefinitionTerm returns a new DefinitionTerm node.

func (*DefinitionTerm) Dump

func (n *DefinitionTerm) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*DefinitionTerm) Kind

func (n *DefinitionTerm) Kind() gast.NodeKind

Kind implements Node.Kind.

type Footnote

A Footnote struct represents a footnote of Markdown (PHP Markdown Extra) text.

type Footnote struct {
    gast.BaseBlock
    Ref   []byte
    Index int
}

func NewFootnote

func NewFootnote(ref []byte) *Footnote

NewFootnote returns a new Footnote node.

func (*Footnote) Dump

func (n *Footnote) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*Footnote) Kind

func (n *Footnote) Kind() gast.NodeKind

Kind implements Node.Kind.

A FootnoteBacklink struct represents a link to a footnote of Markdown (PHP Markdown Extra) text.

type FootnoteBacklink struct {
    gast.BaseInline
    Index    int
    RefCount int
    RefIndex int
}
func NewFootnoteBacklink(index int) *FootnoteBacklink

NewFootnoteBacklink returns a new FootnoteBacklink node.

func (*FootnoteBacklink) Dump

func (n *FootnoteBacklink) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*FootnoteBacklink) Kind

func (n *FootnoteBacklink) Kind() gast.NodeKind

Kind implements Node.Kind.

A FootnoteLink struct represents a link to a footnote of Markdown (PHP Markdown Extra) text.

type FootnoteLink struct {
    gast.BaseInline
    Index    int
    RefCount int
    RefIndex int
}
func NewFootnoteLink(index int) *FootnoteLink

NewFootnoteLink returns a new FootnoteLink node.

func (*FootnoteLink) Dump

func (n *FootnoteLink) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*FootnoteLink) Kind

func (n *FootnoteLink) Kind() gast.NodeKind

Kind implements Node.Kind.

type FootnoteList

A FootnoteList struct represents footnotes of Markdown (PHP Markdown Extra) text.

type FootnoteList struct {
    gast.BaseBlock
    Count int
}

func NewFootnoteList

func NewFootnoteList() *FootnoteList

NewFootnoteList returns a new FootnoteList node.

func (*FootnoteList) Dump

func (n *FootnoteList) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*FootnoteList) Kind

func (n *FootnoteList) Kind() gast.NodeKind

Kind implements Node.Kind.

type Strikethrough

A Strikethrough struct represents a strikethrough of GFM text.

type Strikethrough struct {
    gast.BaseInline
}

func NewStrikethrough

func NewStrikethrough() *Strikethrough

NewStrikethrough returns a new Strikethrough node.

func (*Strikethrough) Dump

func (n *Strikethrough) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*Strikethrough) Kind

func (n *Strikethrough) Kind() gast.NodeKind

Kind implements Node.Kind.

type Table

A Table struct represents a table of Markdown(GFM) text.

type Table struct {
    gast.BaseBlock

    // Alignments returns alignments of the columns.
    Alignments []Alignment
}

func NewTable

func NewTable() *Table

NewTable returns a new Table node.

func (*Table) Dump

func (n *Table) Dump(source []byte, level int)

Dump implements Node.Dump

func (*Table) Kind

func (n *Table) Kind() gast.NodeKind

Kind implements Node.Kind.

type TableCell

A TableCell struct represents a table cell of a Markdown(GFM) text.

type TableCell struct {
    gast.BaseBlock
    Alignment Alignment
}

func NewTableCell

func NewTableCell() *TableCell

NewTableCell returns a new TableCell node.

func (*TableCell) Dump

func (n *TableCell) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*TableCell) Kind

func (n *TableCell) Kind() gast.NodeKind

Kind implements Node.Kind.

type TableHeader

A TableHeader struct represents a table header of Markdown(GFM) text.

type TableHeader struct {
    gast.BaseBlock
    Alignments []Alignment
}

func NewTableHeader

func NewTableHeader(row *TableRow) *TableHeader

NewTableHeader returns a new TableHeader node.

func (*TableHeader) Dump

func (n *TableHeader) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*TableHeader) Kind

func (n *TableHeader) Kind() gast.NodeKind

Kind implements Node.Kind.

type TableRow

A TableRow struct represents a table row of Markdown(GFM) text.

type TableRow struct {
    gast.BaseBlock
    Alignments []Alignment
}

func NewTableRow

func NewTableRow(alignments []Alignment) *TableRow

NewTableRow returns a new TableRow node.

func (*TableRow) Dump

func (n *TableRow) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*TableRow) Kind

func (n *TableRow) Kind() gast.NodeKind

Kind implements Node.Kind.

type TaskCheckBox

A TaskCheckBox struct represents a checkbox of a task list.

type TaskCheckBox struct {
    gast.BaseInline
    IsChecked bool
}

func NewTaskCheckBox

func NewTaskCheckBox(checked bool) *TaskCheckBox

NewTaskCheckBox returns a new TaskCheckBox node.

func (*TaskCheckBox) Dump

func (n *TaskCheckBox) Dump(source []byte, level int)

Dump implements Node.Dump.

func (*TaskCheckBox) Kind

func (n *TaskCheckBox) Kind() gast.NodeKind

Kind implements Node.Kind.