aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers/html
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-08-14 14:59:04 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-19 13:34:10 +0200
commitc4e4343bdb8df16e49d4da118fccc076abdc928a (patch)
tree19113d8630d6a24507184876e9d064ec833bc965 /plugins/base/src/main/kotlin/renderers/html
parent28d6598bc749612f75a5c1a4210eb4b0f5aa1f6e (diff)
downloaddokka-c4e4343bdb8df16e49d4da118fccc076abdc928a.tar.gz
dokka-c4e4343bdb8df16e49d4da118fccc076abdc928a.tar.bz2
dokka-c4e4343bdb8df16e49d4da118fccc076abdc928a.zip
Respect relocated declarations
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index 0d20e8ac..6c1fd472 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -6,13 +6,11 @@ import kotlinx.coroutines.runBlocking
import kotlinx.html.*
import kotlinx.html.stream.createHTML
import org.jetbrains.dokka.DokkaSourceSetID
-import org.jetbrains.dokka.Platform
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.renderers.DefaultRenderer
import org.jetbrains.dokka.base.renderers.TabSortingStrategy
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.DisplaySourceSet
-import org.jetbrains.dokka.model.dfs
import org.jetbrains.dokka.model.properties.PropertyContainer
import org.jetbrains.dokka.model.sourceSetIDs
import org.jetbrains.dokka.model.withDescendants
@@ -557,7 +555,7 @@ open class HtmlRenderer(
from: PageNode? = null,
block: FlowContent.() -> Unit
) = locationProvider.resolve(to, platforms.toSet(), from)?.let { buildLink(it, block) }
- ?: run { context.logger.error("Cannot resolve path for $to"); block() }
+ ?: run { context.logger.error("Cannot resolve path for `$to` from `$from`"); block() }
override fun buildError(node: ContentNode) {
context.logger.error("Unknown ContentNode type: $node")
@@ -574,7 +572,7 @@ open class HtmlRenderer(
override fun FlowContent.buildDRILink(
node: ContentDRILink,
pageContext: ContentPage,
- sourceSetRestriction: Set<DokkaSourceSet>?
+ sourceSetRestriction: Set<DisplaySourceSet>?
) = locationProvider.resolve(node.address, node.sourceSets, pageContext)?.let { address ->
buildLink(address) {
buildText(node.children, pageContext, sourceSetRestriction)
@@ -609,7 +607,7 @@ open class HtmlRenderer(
override suspend fun renderPage(page: PageNode) {
super.renderPage(page)
if (page is ContentPage && page !is ModulePageNode && page !is PackagePageNode)
- searchbarDataInstaller.processPage(page, locationProvider.resolve(page) ?: context.logger.error("Cannot resolve path for ${page.dri}"))
+ searchbarDataInstaller.processPage(page, locationProvider.resolve(page) ?: run { context.logger.error("Cannot resolve path for ${page.dri}"); ""})
}
override fun FlowContent.buildText(textNode: ContentText) =