Skip to content

Commit

Permalink
test: unable to parse image if the image is inside the paragraph
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Jan 6, 2025
1 parent 33d1c19 commit ea1eb16
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/plugins/markdown/document_markdown_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ void main() {

expect(markdown, markdownDocumentEncoded);
});

test('paragraph + image', () {
const markdown = '''This is the first line
![image](https://example.com/image.png)''';
final document = markdownToDocument(markdown);
final nodes = document.root.children;
expect(nodes.length, 2);
expect(nodes[0].delta?.toPlainText(), 'This is the first line\n');
expect(nodes[1].attributes['url'], 'https://example.com/image.png');
});
});
}

Expand Down

0 comments on commit ea1eb16

Please sign in to comment.