diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-08-14 14:59:04 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-19 13:34:10 +0200 |
commit | c4e4343bdb8df16e49d4da118fccc076abdc928a (patch) | |
tree | 19113d8630d6a24507184876e9d064ec833bc965 /plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt | |
parent | 28d6598bc749612f75a5c1a4210eb4b0f5aa1f6e (diff) | |
download | dokka-c4e4343bdb8df16e49d4da118fccc076abdc928a.tar.gz dokka-c4e4343bdb8df16e49d4da118fccc076abdc928a.tar.bz2 dokka-c4e4343bdb8df16e49d4da118fccc076abdc928a.zip |
Respect relocated declarations
Diffstat (limited to 'plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/resolvers/external/DefaultExternalLocationProvider.kt | 4 |
1 files changed, 3 insertions, 1 deletions
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) |