Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var KindBlockMath = gast.NewNodeKind("BlockMath")
KindBlockMath is the NodeKind for BlockMathNode.
var KindGFMEmail = gast.NewNodeKind("GFMEmail")
KindGFMEmail is the NodeKind for GFMEmailNode.
var KindInlineMath = gast.NewNodeKind("InlineMath")
KindInlineMath is the NodeKind for InlineMathNode.
var KindMention = gast.NewNodeKind("Mention")
KindMention is the NodeKind for MentionNode.
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.
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.
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.
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.