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:
@ -18,6 +18,10 @@ func TestParagraphParser(t *testing.T) {
|
||||
text: "",
|
||||
paragraph: nil,
|
||||
},
|
||||
{
|
||||
text: "\n",
|
||||
paragraph: nil,
|
||||
},
|
||||
{
|
||||
text: "Hello world!",
|
||||
paragraph: &ast.Paragraph{
|
||||
@ -28,6 +32,28 @@ func TestParagraphParser(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Hello world!\n",
|
||||
paragraph: &ast.Paragraph{
|
||||
Children: []ast.Node{
|
||||
&ast.Text{
|
||||
Content: "Hello world!",
|
||||
},
|
||||
&ast.LineBreak{},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "Hello world!\n\nNew paragraph.",
|
||||
paragraph: &ast.Paragraph{
|
||||
Children: []ast.Node{
|
||||
&ast.Text{
|
||||
Content: "Hello world!",
|
||||
},
|
||||
&ast.LineBreak{},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
Reference in New Issue
Block a user