chore: implement escaping character node

This commit is contained in:
Steven
2023-12-16 11:47:29 +08:00
parent 1237643028
commit e43a445c34
10 changed files with 132 additions and 0 deletions

View File

@ -26,6 +26,34 @@ func TestParser(t *testing.T) {
},
},
},
{
text: "# Hello world!",
nodes: []ast.Node{
&ast.Heading{
Level: 1,
Children: []ast.Node{
&ast.Text{
Content: "Hello world!",
},
},
},
},
},
{
text: "\\# Hello world!",
nodes: []ast.Node{
&ast.Paragraph{
Children: []ast.Node{
&ast.EscapingCharacter{
Symbol: "#",
},
&ast.Text{
Content: " Hello world!",
},
},
},
},
},
{
text: "**Hello** world!",
nodes: []ast.Node{