71 lines
1.2 KiB
Go
71 lines
1.2 KiB
Go
package kaku
|
|
|
|
type Node interface{}
|
|
|
|
type Document struct{ Children []Node }
|
|
type Heading struct {
|
|
Level int
|
|
Children []Node
|
|
}
|
|
type Paragraph struct{ Children []Node }
|
|
type CodeBlock struct {
|
|
Language string
|
|
Content string
|
|
}
|
|
type HR struct{}
|
|
|
|
type List struct {
|
|
Kind string
|
|
Items []*ListItem
|
|
} // "ul","ol"
|
|
type ListItem struct{ Children []Node }
|
|
|
|
type DefList struct{ Items []*DefItem }
|
|
type DefItem struct {
|
|
Term []Node
|
|
Definition []Node
|
|
}
|
|
|
|
type Quote struct {
|
|
Author string
|
|
Source string
|
|
Link string
|
|
Text []Node
|
|
}
|
|
|
|
type Link struct {
|
|
URL string
|
|
Text []Node
|
|
Label string
|
|
Title string
|
|
}
|
|
type Image struct {
|
|
URL string
|
|
Alt string
|
|
Caption []Node
|
|
}
|
|
type Video struct {
|
|
URL string
|
|
Autoplay bool
|
|
Caption []Node
|
|
}
|
|
type Audio struct{ URL string }
|
|
|
|
type Text struct{ Value string }
|
|
type Bold struct{ Children []Node }
|
|
type Em struct{ Children []Node }
|
|
type Strike struct{ Children []Node }
|
|
type Code struct{ Value string }
|
|
type Aside struct{ Children []Node }
|
|
type RawHTML struct{ Content string }
|
|
|
|
type Details struct {
|
|
Summary []Node
|
|
Content []Node
|
|
}
|
|
|
|
type TodoList struct{ Items []*TodoItem }
|
|
type TodoItem struct {
|
|
State byte // ' ', '@', '~', or 'x'
|
|
Children []Node
|
|
}
|