Documentation
¶
Index ¶
- func IsBlockNode(node Node) bool
- type AutoLink
- type BaseBlock
- type BaseInline
- type BaseNode
- type Blockquote
- type Bold
- type BoldItalic
- type Code
- type CodeBlock
- type EmbeddedContent
- type EscapingCharacter
- type Heading
- type Highlight
- type HorizontalRule
- type Image
- type Italic
- type LineBreak
- type Link
- type Math
- type MathBlock
- type Node
- type NodeType
- type OrderedList
- type Paragraph
- type ReferencedContent
- type Strikethrough
- type Subscript
- type Superscript
- type Table
- type Tag
- type TaskList
- type Text
- type UnorderedList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBlockNode ¶ added in v0.18.2
Types ¶
type AutoLink ¶ added in v0.18.2
type AutoLink struct {
BaseInline
URL string
IsRawText bool
}
type BaseInline ¶ added in v0.18.1
type BaseInline struct {
BaseNode
}
type BaseNode ¶ added in v0.18.1
type BaseNode struct {
// contains filtered or unexported fields
}
func (*BaseNode) NextSibling ¶ added in v0.18.1
func (*BaseNode) PrevSibling ¶ added in v0.18.1
func (*BaseNode) SetNextSibling ¶ added in v0.18.1
func (*BaseNode) SetPrevSibling ¶ added in v0.18.1
type Blockquote ¶ added in v0.18.1
func (*Blockquote) Restore ¶ added in v0.18.2
func (n *Blockquote) Restore() string
func (*Blockquote) Type ¶ added in v0.18.1
func (*Blockquote) Type() NodeType
type Bold ¶ added in v0.18.1
type Bold struct {
BaseInline
// Symbol is "*" or "_".
Symbol string
Children []Node
}
type BoldItalic ¶ added in v0.18.1
type BoldItalic struct {
BaseInline
// Symbol is "*" or "_".
Symbol string
Content string
}
func (*BoldItalic) Restore ¶ added in v0.18.2
func (n *BoldItalic) Restore() string
func (*BoldItalic) Type ¶ added in v0.18.1
func (*BoldItalic) Type() NodeType
type Code ¶ added in v0.18.1
type Code struct {
BaseInline
Content string
}
type EmbeddedContent ¶ added in v0.19.0
func (*EmbeddedContent) Restore ¶ added in v0.19.0
func (n *EmbeddedContent) Restore() string
func (*EmbeddedContent) Type ¶ added in v0.19.0
func (*EmbeddedContent) Type() NodeType
type EscapingCharacter ¶ added in v0.18.2
type EscapingCharacter struct {
BaseInline
Symbol string
}
func (*EscapingCharacter) Restore ¶ added in v0.18.2
func (n *EscapingCharacter) Restore() string
func (*EscapingCharacter) Type ¶ added in v0.18.2
func (*EscapingCharacter) Type() NodeType
type Highlight ¶ added in v0.18.2
type Highlight struct {
BaseInline
Content string
}
type HorizontalRule ¶ added in v0.18.1
func (*HorizontalRule) Restore ¶ added in v0.18.2
func (n *HorizontalRule) Restore() string
func (*HorizontalRule) Type ¶ added in v0.18.1
func (*HorizontalRule) Type() NodeType
type Image ¶ added in v0.18.1
type Image struct {
BaseInline
AltText string
URL string
}
type Italic ¶ added in v0.18.1
type Italic struct {
BaseInline
// Symbol is "*" or "_".
Symbol string
Content string
}
type Link ¶ added in v0.18.1
type Link struct {
BaseInline
Text string
URL string
}
type Math ¶ added in v0.18.2
type Math struct {
BaseInline
Content string
}
type Node ¶
type Node interface {
// Type returns a node type.
Type() NodeType
// Restore returns a string representation of this node.
Restore() string
// PrevSibling returns a previous sibling node of this node.
PrevSibling() Node
// NextSibling returns a next sibling node of this node.
NextSibling() Node
// SetPrevSibling sets a previous sibling node to this node.
SetPrevSibling(Node)
// SetNextSibling sets a next sibling node to this node.
SetNextSibling(Node)
}
func FindNextSiblingExceptLineBreak ¶ added in v0.18.2
func FindPrevSiblingExceptLineBreak ¶ added in v0.18.2
type NodeType ¶ added in v0.18.1
type NodeType uint32
const ( UnknownNode NodeType = iota // Block nodes. LineBreakNode ParagraphNode CodeBlockNode HeadingNode HorizontalRuleNode BlockquoteNode OrderedListNode UnorderedListNode TaskListNode MathBlockNode TableNode EmbeddedContentNode // Inline nodes. TextNode BoldNode ItalicNode BoldItalicNode CodeNode ImageNode LinkNode AutoLinkNode TagNode StrikethroughNode EscapingCharacterNode MathNode HighlightNode SubscriptNode SuperscriptNode ReferencedContentNode )
type OrderedList ¶ added in v0.18.2
type OrderedList struct {
BaseBlock
// Number is the number of the list.
Number string
// Indent is the number of spaces.
Indent int
Children []Node
}
func (*OrderedList) Restore ¶ added in v0.18.2
func (n *OrderedList) Restore() string
func (*OrderedList) Type ¶ added in v0.18.2
func (*OrderedList) Type() NodeType
type ReferencedContent ¶ added in v0.19.0
type ReferencedContent struct {
BaseInline
ResourceName string
Params string
}
func (*ReferencedContent) Restore ¶ added in v0.19.0
func (n *ReferencedContent) Restore() string
func (*ReferencedContent) Type ¶ added in v0.19.0
func (*ReferencedContent) Type() NodeType
type Strikethrough ¶ added in v0.18.1
type Strikethrough struct {
BaseInline
Content string
}
func (*Strikethrough) Restore ¶ added in v0.18.2
func (n *Strikethrough) Restore() string
func (*Strikethrough) Type ¶ added in v0.18.1
func (*Strikethrough) Type() NodeType
type Subscript ¶ added in v0.19.0
type Subscript struct {
BaseInline
Content string
}
type Superscript ¶ added in v0.19.0
type Superscript struct {
BaseInline
Content string
}
func (*Superscript) Restore ¶ added in v0.19.0
func (n *Superscript) Restore() string
func (*Superscript) Type ¶ added in v0.19.0
func (*Superscript) Type() NodeType
type Tag ¶ added in v0.18.1
type Tag struct {
BaseInline
Content string
}
type TaskList ¶ added in v0.18.2
type Text ¶ added in v0.18.1
type Text struct {
BaseInline
Content string
}
type UnorderedList ¶ added in v0.18.2
type UnorderedList struct {
BaseBlock
// Symbol is "*" or "-" or "+".
Symbol string
// Indent is the number of spaces.
Indent int
Children []Node
}
func (*UnorderedList) Restore ¶ added in v0.18.2
func (n *UnorderedList) Restore() string
func (*UnorderedList) Type ¶ added in v0.18.2
func (*UnorderedList) Type() NodeType
Click to show internal directories.
Click to hide internal directories.