diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-09-02 17:40:21 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-09-07 08:07:10 +0200 |
commit | 581d064dc1fba01fd27f560e158df48498c7e776 (patch) | |
tree | fd0babc209a7fe8af19c41a7b511a2a86d6d4440 /plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | |
parent | 901343cc5c98dbf7f16f232c338487bfcea06790 (diff) | |
download | dokka-581d064dc1fba01fd27f560e158df48498c7e776.tar.gz dokka-581d064dc1fba01fd27f560e158df48498c7e776.tar.bz2 dokka-581d064dc1fba01fd27f560e158df48498c7e776.zip |
Let markdown display img like resources correctly
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 83af968d..e10672a6 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -9,6 +9,7 @@ import org.jetbrains.dokka.DokkaSourceSetID import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.renderers.DefaultRenderer import org.jetbrains.dokka.base.renderers.TabSortingStrategy +import org.jetbrains.dokka.base.renderers.isImage import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.model.DisplaySourceSet import org.jetbrains.dokka.model.properties.PropertyContainer @@ -346,8 +347,7 @@ open class HtmlRenderer( node: ContentEmbeddedResource, pageContext: ContentPage ) { // TODO: extension point there - val imageExtensions = setOf("png", "jpg", "jpeg", "gif", "bmp", "tif", "webp", "svg") - return if (File(node.address).extension.toLowerCase() in imageExtensions) { + return if (node.isImage()) { //TODO: add imgAttrs parsing val imgAttrs = node.extra.allOfType<SimpleAttr>().joinAttr() img(src = node.address, alt = node.altText) |