From 901343cc5c98dbf7f16f232c338487bfcea06790 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Wed, 2 Sep 2020 17:15:59 +0200 Subject: NullPointerException on images #1424 --- .../base/src/test/kotlin/markdown/ParserTest.kt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'plugins/base/src/test/kotlin/markdown') diff --git a/plugins/base/src/test/kotlin/markdown/ParserTest.kt b/plugins/base/src/test/kotlin/markdown/ParserTest.kt index 838233eb..e127afc2 100644 --- a/plugins/base/src/test/kotlin/markdown/ParserTest.kt +++ b/plugins/base/src/test/kotlin/markdown/ParserTest.kt @@ -1167,5 +1167,28 @@ class ParserTest : KDocTest() { ) executeTest(kdoc, expectedDocumentationNode) } + + @Test + fun image(){ + val kdoc = "![Sample image](https://www.google.pl/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png)" + val expectedDocumentationNode = DocumentationNode( + listOf( + Description( + P( + listOf( + Img( + emptyList(), + mapOf( + "href" to "https://www.google.pl/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png", + "alt" to "Sample image" + ) + ) + ) + ) + ) + ) + ) + executeTest(kdoc, expectedDocumentationNode) + } } -- cgit