diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-04-10 16:59:25 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-05-13 10:03:48 +0200 |
commit | 6166ddfeb6ee977a302d4cacc80dac23cc7e2baf (patch) | |
tree | 1fb93e53c8fbd5f76cf2f1438fa0ff4cdfe3494e /plugins/base/src/main/kotlin/translators/descriptors | |
parent | 79d1827b5d249c0a597c6c2f9cb91ff8f5689d94 (diff) | |
download | dokka-6166ddfeb6ee977a302d4cacc80dac23cc7e2baf.tar.gz dokka-6166ddfeb6ee977a302d4cacc80dac23cc7e2baf.tar.bz2 dokka-6166ddfeb6ee977a302d4cacc80dac23cc7e2baf.zip |
Working tests for includes, sources and samples. Minor bugfixes
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/descriptors')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index be18c592..00e3239c 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -500,12 +500,15 @@ private class DokkaDescriptorVisitor( .filter { it.kind == ClassKind.ENUM_ENTRY } .map { enumEntryDescriptor(it, parent) } - - private fun DeclarationDescriptor.resolveDescriptorData(platformData: PlatformData?): PlatformDependent<DocumentationNode> = - if (platformData != null) PlatformDependent.from( - platformData, - getDocumentation() - ) else PlatformDependent.expectFrom(getDocumentation()) + private fun DeclarationDescriptor.resolveDescriptorData(platformData: PlatformData?): PlatformDependent<DocumentationNode> { + val documentation = getDocumentation() + return if (documentation.children.isEmpty()) + PlatformDependent.empty() + else if (platformData != null) + PlatformDependent.from(platformData, documentation) + else + PlatformDependent.expectFrom(documentation) + } private fun ClassDescriptor.resolveClassDescriptionData(platformData: PlatformData?): ClassInfo { return ClassInfo( |