Documentation
¶
Index ¶
- func Generate(w io.Writer, n Node, g Generator) error
- func Walk(n Node, fn func(Node) error) error
- type BaseNode
- type Bold
- type Code
- type CodeIn
- type Container
- type Custom
- type Generator
- type HR
- type Image
- type Indent
- type Italic
- type Link
- type Node
- type Quote
- type QuoteOf
- type Root
- type Spoiler
- type Sub
- type Sup
- type Text
- type Underline
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Generator ¶
type Generator interface {
Root(w io.Writer, n *Root) error
Text(w io.Writer, n *Text) error
Bold(w io.Writer, n *Bold) error
Italic(w io.Writer, n *Italic) error
Underline(w io.Writer, n *Underline) error
Sup(w io.Writer, n *Sup) error
Sub(w io.Writer, n *Sub) error
Link(w io.Writer, n *Link) error
Image(w io.Writer, n *Image) error
Code(w io.Writer, n *Code) error
CodeIn(w io.Writer, n *CodeIn) error
Quote(w io.Writer, n *Quote) error
QuoteOf(w io.Writer, n *QuoteOf) error
Spoiler(w io.Writer, n *Spoiler) error
Indent(w io.Writer, n *Indent) error
HR(w io.Writer, n *HR) error
Custom(w io.Writer, n *Custom) error
}
Generator defines how to generate output for each node type. Implementations should write to w.
type Node ¶
type Node interface {
fmt.Stringer
Transform(op func(Node) (Node, error)) (Node, error)
SetPos(start, end int)
GetPos() (int, int)
// contains filtered or unexported methods
}
Node represents a parsed element of markup.
Click to show internal directories.
Click to hide internal directories.