diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-07-23 12:38:59 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-19 13:34:10 +0200 |
commit | fc38ceda06d92978175d37bb7197763539c966a2 (patch) | |
tree | 69751ac7fd6083fabce8a65bae8e84f85ece5358 /plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt | |
parent | a3880835c4e6c6d0570ab2193be50bd739e9f2ca (diff) | |
download | dokka-fc38ceda06d92978175d37bb7197763539c966a2.tar.gz dokka-fc38ceda06d92978175d37bb7197763539c966a2.tar.bz2 dokka-fc38ceda06d92978175d37bb7197763539c966a2.zip |
Make unresolved links render as text
Diffstat (limited to 'plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt index b9df45ae..1c27959f 100644 --- a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt @@ -48,10 +48,10 @@ open class DefaultLocationProvider( pageGraphRoot.children.forEach { registerPath(it, emptyList()) } } - override fun resolve(node: PageNode, context: PageNode?, skipExtension: Boolean): String = + override fun resolve(node: PageNode, context: PageNode?, skipExtension: Boolean) = pathTo(node, context) + if (!skipExtension) extension else "" - override fun resolve(dri: DRI, sourceSets: Set<DisplaySourceSet>, context: PageNode?): String = + override fun resolve(dri: DRI, sourceSets: Set<DisplaySourceSet>, context: PageNode?) = pagesIndex[dri]?.let { resolve(it, context) } ?: anchorsIndex[dri]?.let { resolve(it, context) + "#$dri" } // Not found in PageGraph, that means it's an external link |