diff options
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r-- | core/src/main/kotlin/Formats/StructuredFormatService.kt | 11 | ||||
-rw-r--r-- | core/src/main/kotlin/Generation/DocumentationMerger.kt | 8 | ||||
-rw-r--r-- | core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 2 |
3 files changed, 13 insertions, 8 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt index 7299670e..76f9366f 100644 --- a/core/src/main/kotlin/Formats/StructuredFormatService.kt +++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt @@ -900,18 +900,17 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, val platforms = effectivePlatformsForNode(type) appendIndexRow(platforms) { appendPlatforms(platforms) - appendHeader(level = 5) { - appendLink(link(node, type) { - if (it.kind == NodeKind.ExternalClass) it.name else it.qualifiedName() - }) - } - if (type.kind == NodeKind.ExternalClass) { val packageName = type.owner?.name if (packageName != null) { appendText(" (extensions in package $packageName)") } } + appendHeader(level = 5) { + appendLink(link(node, type) { + if (it.kind == NodeKind.ExternalClass) it.name else it.qualifiedName() + }) + } appendContent(type.summary) } diff --git a/core/src/main/kotlin/Generation/DocumentationMerger.kt b/core/src/main/kotlin/Generation/DocumentationMerger.kt index 5d53868a..53dc23a9 100644 --- a/core/src/main/kotlin/Generation/DocumentationMerger.kt +++ b/core/src/main/kotlin/Generation/DocumentationMerger.kt @@ -164,7 +164,13 @@ class DocumentationMerger( if (groupNode.kind == NodeKind.ExternalClass){ val refs = nodes.flatMap { it.allReferences() }.filter { it.kind != RefKind.Owner && it.kind != RefKind.TopLevelPage } - refs.forEach { it.to.append(groupNode, RefKind.TopLevelPage); groupNode.append(it.to, RefKind.Member) } + refs.forEach { + if (it.kind != RefKind.Link) { + it.to.dropReferences { ref -> ref.kind == RefKind.Owner } + it.to.append(groupNode, RefKind.Owner) + } + groupNode.append(it.to, it.kind) + } } // if nodes are classes, nested members should be also merged and diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index eb0399c7..3168e033 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -423,7 +423,7 @@ class DocumentationBuilder fun DocumentationModule.appendFragments(fragments: Collection<PackageFragmentDescriptor>, packageContent: Map<String, Content>, packageDocumentationBuilder: PackageDocumentationBuilder) { - val allFqNames = fragments.map { it.fqName }.distinct() + val allFqNames = fragments.filter{ it.isDocumented(passConfiguration) }.map { it.fqName }.distinct() for (packageName in allFqNames) { if (packageName.isRoot && !passConfiguration.includeRootPackage) continue |