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