mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: implement html renderer
This commit is contained in:
@ -57,9 +57,9 @@ func TestParser(t *testing.T) {
|
||||
&ast.Text{
|
||||
Content: "!",
|
||||
},
|
||||
&ast.LineBreak{},
|
||||
},
|
||||
},
|
||||
&ast.LineBreak{},
|
||||
&ast.Paragraph{
|
||||
Children: []ast.Node{
|
||||
&ast.Text{
|
||||
@ -84,15 +84,36 @@ func TestParser(t *testing.T) {
|
||||
&ast.Text{
|
||||
Content: "!",
|
||||
},
|
||||
&ast.LineBreak{},
|
||||
},
|
||||
},
|
||||
&ast.LineBreak{},
|
||||
&ast.CodeBlock{
|
||||
Language: "javascript",
|
||||
Content: "console.log(\"Hello world!\");",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Hello world!\n\nNew paragraph.",
|
||||
nodes: []ast.Node{
|
||||
&ast.Paragraph{
|
||||
Children: []ast.Node{
|
||||
&ast.Text{
|
||||
Content: "Hello world!",
|
||||
},
|
||||
&ast.LineBreak{},
|
||||
},
|
||||
},
|
||||
&ast.LineBreak{},
|
||||
&ast.Paragraph{
|
||||
Children: []ast.Node{
|
||||
&ast.Text{
|
||||
Content: "New paragraph.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
Reference in New Issue
Block a user