mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: implement restore nodes
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/usememos/memos/plugin/gomark/ast"
|
||||
"github.com/usememos/memos/plugin/gomark/parser/tokenizer"
|
||||
"github.com/usememos/memos/plugin/gomark/restore"
|
||||
)
|
||||
|
||||
func TestEscapingCharacterParser(t *testing.T) {
|
||||
@ -25,6 +26,6 @@ func TestEscapingCharacterParser(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
tokens := tokenizer.Tokenize(test.text)
|
||||
node, _ := NewEscapingCharacterParser().Parse(tokens)
|
||||
require.Equal(t, StringifyNodes([]ast.Node{test.node}), StringifyNodes([]ast.Node{node}))
|
||||
require.Equal(t, restore.Restore([]ast.Node{test.node}), restore.Restore([]ast.Node{node}))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user