aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers/html
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-07-23 12:38:59 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-19 13:34:10 +0200
commitfc38ceda06d92978175d37bb7197763539c966a2 (patch)
tree69751ac7fd6083fabce8a65bae8e84f85ece5358 /plugins/base/src/main/kotlin/renderers/html
parenta3880835c4e6c6d0570ab2193be50bd739e9f2ca (diff)
downloaddokka-fc38ceda06d92978175d37bb7197763539c966a2.tar.gz
dokka-fc38ceda06d92978175d37bb7197763539c966a2.tar.bz2
dokka-fc38ceda06d92978175d37bb7197763539c966a2.zip
Make unresolved links render as text
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt4
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 8c2e9c9e..1a2a98b3 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -522,7 +522,7 @@ open class HtmlRenderer(
}
private fun FlowContent.buildLink(to: PageNode, from: PageNode) =
- buildLink(locationProvider.resolve(to, from)) {
+ buildLink(locationProvider.resolve(to, from)!!) {
text(to.name)
}
@@ -550,7 +550,7 @@ open class HtmlRenderer(
platforms: List<DisplaySourceSet>,
from: PageNode? = null,
block: FlowContent.() -> Unit
- ) = buildLink(locationProvider.resolve(to, platforms.toSet(), from), block)
+ ) = buildLink(locationProvider.resolve(to, platforms.toSet(), from).orEmpty(), block)
override fun buildError(node: ContentNode) {
context.logger.error("Unknown ContentNode type: $node")