diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 1a2a98b3..e3d54e49 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -563,6 +563,20 @@ open class HtmlRenderer( override fun FlowContent.buildLink(address: String, content: FlowContent.() -> Unit) = a(href = address, block = content) + + override fun FlowContent.buildDRILink( + node: ContentDRILink, + pageContext: ContentPage, + sourceSetRestriction: Set<DokkaSourceSet>? + ) = locationProvider.resolve(node.address, node.sourceSets, pageContext)?.let { address -> + buildLink(address) { + buildText(node.children, pageContext, sourceSetRestriction) + } + } ?: span { + attributes["data-unresolved-link"] = "true" + buildText(node.children, pageContext, sourceSetRestriction) + } + override fun FlowContent.buildCodeBlock( code: ContentCodeBlock, pageContext: ContentPage |