diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-05-05 15:07:55 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-05-13 10:03:48 +0200 |
commit | abc0d2791a47635e4ce909041e7705de4121bb05 (patch) | |
tree | 6f8c90b15d54b6fa9a00a7bc334b2c70e5e8896d /plugins/base/src/main/kotlin/translators | |
parent | bbfb105c1e697eb792301b9fa9d9823344734aeb (diff) | |
download | dokka-abc0d2791a47635e4ce909041e7705de4121bb05.tar.gz dokka-abc0d2791a47635e4ce909041e7705de4121bb05.tar.bz2 dokka-abc0d2791a47635e4ce909041e7705de4121bb05.zip |
Introduce requested changes
Diffstat (limited to 'plugins/base/src/main/kotlin/translators')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt | 9 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt | 2 |
2 files changed, 5 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 00e3239c..128b9bd4 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -500,14 +500,13 @@ private class DokkaDescriptorVisitor( .filter { it.kind == ClassKind.ENUM_ENTRY } .map { enumEntryDescriptor(it, parent) } - private fun DeclarationDescriptor.resolveDescriptorData(platformData: PlatformData?): PlatformDependent<DocumentationNode> { - val documentation = getDocumentation() - return if (documentation.children.isEmpty()) + private fun DeclarationDescriptor.resolveDescriptorData(platformData: PlatformData?): PlatformDependent<DocumentationNode> = getDocumentation().let { + if (it.children.isEmpty()) PlatformDependent.empty() else if (platformData != null) - PlatformDependent.from(platformData, documentation) + PlatformDependent.from(platformData, it) else - PlatformDependent.expectFrom(documentation) + PlatformDependent.expectFrom(it) } private fun ClassDescriptor.resolveClassDescriptionData(platformData: PlatformData?): ClassInfo { diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index dd28b533..9c7abdd9 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -268,7 +268,7 @@ open class DefaultPageCreator( platforms.forEach { header(4, kind = ContentKind.Comment, platformData = setOf(it)) { text("See also") } } - table(kind = ContentKind.Comment) { + table(kind = ContentKind.Sample) { platforms.flatMap { platform -> seeAlsoTags.mapNotNull { (_, see) -> see.getOrExpect(platform)?.let { |