From 6166ddfeb6ee977a302d4cacc80dac23cc7e2baf Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Fri, 10 Apr 2020 16:59:25 +0200 Subject: Working tests for includes, sources and samples. Minor bugfixes --- .../DefaultDescriptorToDocumentableTranslator.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'plugins/base/src/main/kotlin/translators/descriptors') 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 = - if (platformData != null) PlatformDependent.from( - platformData, - getDocumentation() - ) else PlatformDependent.expectFrom(getDocumentation()) + private fun DeclarationDescriptor.resolveDescriptorData(platformData: PlatformData?): PlatformDependent { + 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( -- cgit