From c4e4343bdb8df16e49d4da118fccc076abdc928a Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Fri, 14 Aug 2020 14:59:04 +0200 Subject: Respect relocated declarations --- .../main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt') diff --git a/plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt index 18f52cce..b92b5330 100644 --- a/plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt @@ -10,8 +10,10 @@ open class DefaultExternalLocationProvider( val extension: String, val dokkaContext: DokkaContext ) : ExternalLocationProvider { - override fun resolve(dri: DRI): String? { // TODO: classes without packages? + override fun resolve(dri: DRI): String? { val docURL = externalDocumentation.documentationURL.toString().removeSuffix("/") + "/" + externalDocumentation.packageList.locations[dri.toString()]?.let { path -> return "$docURL$path" } + val classNamesChecked = dri.classNames ?: return "$docURL${dri.packageName ?: ""}/index$extension" val classLink = (listOfNotNull(dri.packageName) + classNamesChecked.split('.')) .joinToString("/", transform = ::identifierToFilename) -- cgit