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/gfm/src/main/kotlin | |
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/gfm/src/main/kotlin')
-rw-r--r-- | plugins/gfm/src/main/kotlin/GfmPlugin.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/gfm/src/main/kotlin/GfmPlugin.kt b/plugins/gfm/src/main/kotlin/GfmPlugin.kt index 65723a0c..0376b32e 100644 --- a/plugins/gfm/src/main/kotlin/GfmPlugin.kt +++ b/plugins/gfm/src/main/kotlin/GfmPlugin.kt @@ -7,6 +7,7 @@ import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.renderers.DefaultRenderer import org.jetbrains.dokka.base.renderers.PackageListCreator import org.jetbrains.dokka.base.renderers.RootCreator +import org.jetbrains.dokka.base.renderers.isImage import org.jetbrains.dokka.base.resolvers.local.DokkaLocationProvider import org.jetbrains.dokka.base.resolvers.local.LocationProviderFactory import org.jetbrains.dokka.model.DisplaySourceSet @@ -155,7 +156,10 @@ open class CommonmarkRenderer( } override fun StringBuilder.buildResource(node: ContentEmbeddedResource, pageContext: ContentPage) { - append("Resource") + if(node.isImage()){ + append("!") + } + append("[${node.altText}](${node.address})") } override fun StringBuilder.buildTable( |