mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: implement gomark skeleton
This commit is contained in:
42
plugin/gomark/ast/inline.go
Normal file
42
plugin/gomark/ast/inline.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package ast
|
||||
|
||||
type BaseInline struct{}
|
||||
|
||||
type Text struct {
|
||||
BaseInline
|
||||
|
||||
Content string
|
||||
}
|
||||
|
||||
var NodeTypeText = NewNodeType("Text")
|
||||
|
||||
func NewText(content string) *Text {
|
||||
return &Text{
|
||||
Content: content,
|
||||
}
|
||||
}
|
||||
|
||||
func (*Text) Type() NodeType {
|
||||
return NodeTypeText
|
||||
}
|
||||
|
||||
type Bold struct {
|
||||
BaseInline
|
||||
|
||||
// Symbol is "*" or "_"
|
||||
Symbol string
|
||||
Content string
|
||||
}
|
||||
|
||||
var NodeTypeBold = NewNodeType("Bold")
|
||||
|
||||
func NewBold(symbol, content string) *Bold {
|
||||
return &Bold{
|
||||
Symbol: symbol,
|
||||
Content: content,
|
||||
}
|
||||
}
|
||||
|
||||
func (*Bold) Type() NodeType {
|
||||
return NodeTypeBold
|
||||
}
|
Reference in New Issue
Block a user