ast

package
v0.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindBlockMath = gast.NewNodeKind("BlockMath")

KindBlockMath is the NodeKind for BlockMathNode.

View Source
var KindGFMEmail = gast.NewNodeKind("GFMEmail")

KindGFMEmail is the NodeKind for GFMEmailNode.

View Source
var KindInlineMath = gast.NewNodeKind("InlineMath")

KindInlineMath is the NodeKind for InlineMathNode.

View Source
var KindMention = gast.NewNodeKind("Mention")

KindMention is the NodeKind for MentionNode.

View Source
var KindTag = gast.NewNodeKind("Tag")

KindTag is the NodeKind for TagNode.

Functions

This section is empty.

Types

type BlockMathNode

type BlockMathNode struct {
	gast.BaseBlock

	// Source is the complete logical source spelling.
	Source []byte
	// contains filtered or unexported fields
}

BlockMathNode represents literal flow math, including its dollar fences.

func NewBlockMathNode

func NewBlockMathNode(opening []byte, fence int) *BlockMathNode

NewBlockMathNode creates a flow math node from its opening line.

func (*BlockMathNode) AppendSource

func (n *BlockMathNode) AppendSource(line []byte)

AppendSource appends one logical source line to the node.

func (*BlockMathNode) Dump

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

Dump implements Node.Dump for debugging.

func (*BlockMathNode) FenceLength

func (n *BlockMathNode) FenceLength() int

FenceLength returns the opening dollar fence length.

func (*BlockMathNode) IsRaw

func (*BlockMathNode) IsRaw() bool

IsRaw prevents Goldmark from parsing math contents as Markdown.

func (*BlockMathNode) Kind

func (*BlockMathNode) Kind() gast.NodeKind

Kind returns KindBlockMath.

type GFMEmailNode

type GFMEmailNode struct {
	gast.BaseInline

	// Source is the exact Markdown source spelling.
	Source []byte
	// Address is the decoded email address used by the rendered link.
	Address []byte
}

GFMEmailNode represents a written extended GFM email autolink.

func (*GFMEmailNode) Dump

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

Dump implements Node.Dump for debugging.

func (*GFMEmailNode) Kind

func (*GFMEmailNode) Kind() gast.NodeKind

Kind returns KindGFMEmail.

type InlineMathNode

type InlineMathNode struct {
	gast.BaseInline

	// Source is the complete logical source spelling.
	Source []byte
}

InlineMathNode represents literal inline math, including its dollar delimiters.

func (*InlineMathNode) Dump

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

Dump implements Node.Dump for debugging.

func (*InlineMathNode) Kind

func (*InlineMathNode) Kind() gast.NodeKind

Kind returns KindInlineMath.

type MentionNode

type MentionNode struct {
	gast.BaseInline

	// Username without the @ prefix.
	Username []byte
	// Source is the exact recognized source spelling, including the @ prefix.
	Source []byte
}

MentionNode represents an @mention in the markdown AST.

func (*MentionNode) Dump

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

Dump implements Node.Dump for debugging.

func (*MentionNode) Kind

func (*MentionNode) Kind() gast.NodeKind

Kind returns KindMention.

type TagNode

type TagNode struct {
	gast.BaseInline

	// Tag is the emitted tag value without the # prefix.
	Tag []byte
	// Source is the complete recognized source span, including the # prefix.
	Source []byte
}

TagNode represents a #tag in the markdown AST.

func (*TagNode) Dump

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

Dump implements Node.Dump for debugging.

func (*TagNode) Kind

func (*TagNode) Kind() gast.NodeKind

Kind returns KindTag.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL