aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt4
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt6
-rw-r--r--plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt6
3 files changed, 7 insertions, 9 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt
index 7a93f0b9..6cb35e66 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt
@@ -20,11 +20,9 @@ import org.jetbrains.kotlin.utils.addToStdlib.safeAs
class SourceLinksTransformer(val context: DokkaContext) : PageTransformer {
- private lateinit var sourceLinks: List<SourceLink>
-
override fun invoke(input: RootPageNode): RootPageNode {
- sourceLinks = context.configuration.passesConfigurations
+ val sourceLinks = context.configuration.passesConfigurations
.flatMap { it.sourceLinks.map { sl -> SourceLink(sl, it.platformData) } }
return input.transformContentPagesTree { node ->
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
index 87f47ac8..312c7a5a 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
@@ -7,9 +7,6 @@ import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder.Doc
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.*
import org.jetbrains.dokka.model.doc.*
-import org.jetbrains.dokka.model.DFunction
-import org.jetbrains.dokka.model.doc.Property
-import org.jetbrains.dokka.model.doc.TagWrapper
import org.jetbrains.dokka.model.properties.WithExtraProperties
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.utilities.DokkaLogger
@@ -78,9 +75,8 @@ open class DefaultPageCreator(
protected open fun contentForPackage(p: DPackage) = contentBuilder.contentFor(p) {
group(p.dri, p.platformData.toSet(), ContentKind.Packages) {
header(1) { text("Package ${p.name}") }
- +contentForComments(p)
}
- header(1) { text("Package ${p.name}") }
+ +contentForComments(p)
+contentForScope(p, p.dri, p.platformData)
block("Type aliases", 2, ContentKind.TypeAliases, p.typealiases, p.platformData.toSet()) {
link(it.name, it.dri)
diff --git a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt
index 852ac735..5f8d1dc4 100644
--- a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt
+++ b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt
@@ -1,5 +1,6 @@
package renderers
+import org.jetbrains.dokka.DokkaConfigurationImpl
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.renderers.html.RootCreator
import org.jetbrains.dokka.base.resolvers.external.DokkaExternalLocationProviderFactory
@@ -9,6 +10,7 @@ import org.jetbrains.dokka.base.resolvers.local.LocationProvider
import org.jetbrains.dokka.base.resolvers.local.LocationProviderFactory
import org.jetbrains.dokka.base.signatures.KotlinSignatureProvider
import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
+import org.jetbrains.dokka.base.transformers.pages.samples.DefaultSamplesTransformer
import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.Documentable
@@ -28,9 +30,11 @@ abstract class RenderingOnlyTestBase {
val context = MockContext(
DokkaBase().outputWriter to { _ -> files },
DokkaBase().locationProviderFactory to ::DefaultLocationProviderFactory,
+ DokkaBase().samplesTransformer to ::DefaultSamplesTransformer,
DokkaBase().htmlPreprocessors to { _ -> RootCreator },
DokkaBase().externalLocationProviderFactory to { _ -> ::JavadocExternalLocationProviderFactory },
- DokkaBase().externalLocationProviderFactory to { _ -> ::DokkaExternalLocationProviderFactory }
+ DokkaBase().externalLocationProviderFactory to { _ -> ::DokkaExternalLocationProviderFactory },
+ testConfiguration = DokkaConfigurationImpl("", "", false, null, emptyList(), emptyList(), emptyList())
)
protected val renderedContent: Element by lazy {