aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-05-16 18:46:07 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-05-16 18:46:07 +0300
commitad95537c3f2eb5ba1478f82fd5b476d2309bc986 (patch)
treeb2e6444683904fe94c289c5d7dcc333a1b80a04a /core
parentb3fa0d91fd466c3319f3a37a1cc5e82be2b89697 (diff)
downloaddokka-ad95537c3f2eb5ba1478f82fd5b476d2309bc986.tar.gz
dokka-ad95537c3f2eb5ba1478f82fd5b476d2309bc986.tar.bz2
dokka-ad95537c3f2eb5ba1478f82fd5b476d2309bc986.zip
Fix external links to packages with uppercase letters in dokka mode
Fix #285
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt12
1 files changed, 5 insertions, 7 deletions
diff --git a/core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt b/core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt
index ebea7183..e19ecf76 100644
--- a/core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt
+++ b/core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt
@@ -214,13 +214,11 @@ interface InboundExternalLinkResolutionService {
else return "$path/index.$extension"
}
- fun getPathWithoutExtension(symbol: DeclarationDescriptor): String {
- if (symbol.containingDeclaration == null)
- return identifierToFilename(symbol.name.asString())
- else if (symbol is PackageFragmentDescriptor) {
- return symbol.fqName.asString()
- } else {
- return getPathWithoutExtension(symbol.containingDeclaration!!) + '/' + identifierToFilename(symbol.name.asString())
+ private fun getPathWithoutExtension(symbol: DeclarationDescriptor): String {
+ return when {
+ symbol.containingDeclaration == null -> identifierToFilename(symbol.name.asString())
+ symbol is PackageFragmentDescriptor -> identifierToFilename(symbol.fqName.asString())
+ else -> getPathWithoutExtension(symbol.containingDeclaration!!) + '/' + identifierToFilename(symbol.name.asString())
}
}