mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: implement part of nodes
This commit is contained in:
@ -24,7 +24,9 @@ func (*TextParser) Match(tokens []*tokenizer.Token) (int, bool) {
|
||||
|
||||
func (*TextParser) Parse(tokens []*tokenizer.Token) ast.Node {
|
||||
if len(tokens) == 0 {
|
||||
return ast.NewText("")
|
||||
return &ast.Text{}
|
||||
}
|
||||
return &ast.Text{
|
||||
Content: tokens[0].String(),
|
||||
}
|
||||
return ast.NewText(tokens[0].String())
|
||||
}
|
||||
|
Reference in New Issue
Block a user