feat: image and link parser (#1744)

* feat: image and link parser

* chore: update
This commit is contained in:
boojack
2023-05-26 08:43:37 +08:00
committed by GitHub
parent 523ef2bba5
commit dbc85fe7e4
8 changed files with 252 additions and 18 deletions

View File

@ -17,7 +17,7 @@ func TestParagraphParser(t *testing.T) {
paragraph: nil,
},
{
text: "Hello world!",
text: "Hello world",
paragraph: &ParagraphParser{
ContentTokens: []*tokenizer.Token{
{
@ -30,14 +30,14 @@ func TestParagraphParser(t *testing.T) {
},
{
Type: tokenizer.Text,
Value: "world!",
Value: "world",
},
},
},
},
{
text: `Hello
world!`,
world`,
paragraph: &ParagraphParser{
ContentTokens: []*tokenizer.Token{
{
@ -53,7 +53,7 @@ world!`,
},
{
text: `Hello \n
world!`,
world`,
paragraph: &ParagraphParser{
ContentTokens: []*tokenizer.Token{
{