feat: implement switchable task list node

This commit is contained in:
Steven
2024-01-05 08:40:16 +08:00
parent 6320d042c8
commit 454cd4e24f
16 changed files with 208 additions and 38 deletions

View File

@ -96,6 +96,7 @@ func TestParser(t *testing.T) {
},
},
},
&ast.LineBreak{},
&ast.Paragraph{
Children: []ast.Node{
&ast.Text{
@ -126,6 +127,7 @@ func TestParser(t *testing.T) {
},
},
},
&ast.LineBreak{},
&ast.CodeBlock{
Language: "javascript",
Content: "console.log(\"Hello world!\");",
@ -143,6 +145,7 @@ func TestParser(t *testing.T) {
},
},
&ast.LineBreak{},
&ast.LineBreak{},
&ast.Paragraph{
Children: []ast.Node{
&ast.Text{
@ -163,6 +166,7 @@ func TestParser(t *testing.T) {
},
},
},
&ast.LineBreak{},
&ast.TaskList{
Symbol: tokenizer.Hyphen,
Complete: false,
@ -186,6 +190,7 @@ func TestParser(t *testing.T) {
},
},
},
&ast.LineBreak{},
&ast.TaskList{
Symbol: tokenizer.Hyphen,
Complete: true,