From 8b0fdae9ca229ab183822118dfdaa40cd32f1876 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Mon, 30 Sep 2019 23:10:32 +0200 Subject: Fix for multiple file rendering issues --- core/src/main/kotlin/Generation/DocumentationMerger.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/Generation/DocumentationMerger.kt b/core/src/main/kotlin/Generation/DocumentationMerger.kt index 5d53868a..942688d4 100644 --- a/core/src/main/kotlin/Generation/DocumentationMerger.kt +++ b/core/src/main/kotlin/Generation/DocumentationMerger.kt @@ -164,7 +164,7 @@ 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 { groupNode.append(it.to, RefKind.Member) } } // if nodes are classes, nested members should be also merged and -- cgit From d007f06e011f2d1699a1d2c34e04c915c0106aed Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Mon, 30 Sep 2019 23:24:57 +0200 Subject: Fix package suppression --- core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src') 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, packageContent: Map, 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 -- cgit From 44096805509f2398e360211ed7fae1125da44f7b Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Mon, 30 Sep 2019 23:29:42 +0200 Subject: Fix alltypes page look --- core/src/main/kotlin/Formats/StructuredFormatService.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'core/src') 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) } -- cgit From 60053306d59e844717999c7843206c744505e272 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Thu, 3 Oct 2019 21:27:49 +0200 Subject: Fix the extension function file location --- core/src/main/kotlin/Generation/DocumentationMerger.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/Generation/DocumentationMerger.kt b/core/src/main/kotlin/Generation/DocumentationMerger.kt index 942688d4..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 { 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 -- cgit From a28db3c1a618ce4b413c7315e8b0a9f43b6ade4a Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Thu, 3 Oct 2019 21:28:00 +0200 Subject: Fix the tests --- core/src/test/kotlin/model/PackageTest.kt | 10 +--------- .../testData/multiplatformProject/fileTree.txt | 1 + 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'core/src') diff --git a/core/src/test/kotlin/model/PackageTest.kt b/core/src/test/kotlin/model/PackageTest.kt index e20e6afa..47c88385 100644 --- a/core/src/test/kotlin/model/PackageTest.kt +++ b/core/src/test/kotlin/model/PackageTest.kt @@ -126,15 +126,7 @@ abstract class BasePackageTest(val analysisPlatform: Platform) { analysisPlatform = analysisPlatform ) ) { model -> - assertEquals(1, model.members.count()) - with(model.members.elementAt(0)) { - assertEquals(NodeKind.Package, kind) - assertEquals("simple.name", name) - assertEquals(Content.Empty, content) - assertTrue(details.none()) - assertTrue(members.none()) - assertTrue(links.none()) - } + assertEquals(0, model.members.count()) } } } diff --git a/runners/gradle-integration-tests/testData/multiplatformProject/fileTree.txt b/runners/gradle-integration-tests/testData/multiplatformProject/fileTree.txt index 51a5df94..e9cc847c 100644 --- a/runners/gradle-integration-tests/testData/multiplatformProject/fileTree.txt +++ b/runners/gradle-integration-tests/testData/multiplatformProject/fileTree.txt @@ -11,6 +11,7 @@ jvm.html kotlin.-string/ index.html + my-extension.html main.html shared.html package-list -- cgit