mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: implement escaping character node
This commit is contained in:
@ -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{
|
||||
|
Reference in New Issue
Block a user