aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers/documentables
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/documentables')
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentablesToPageTranslator.kt13
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/PageContentBuilder.kt1
2 files changed, 10 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentablesToPageTranslator.kt b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentablesToPageTranslator.kt
index 90f8e2d7..d28791ab 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentablesToPageTranslator.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentablesToPageTranslator.kt
@@ -1,21 +1,26 @@
package org.jetbrains.dokka.base.transformers.documentables
import org.jetbrains.dokka.CoreExtensions
+import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
import org.jetbrains.dokka.model.Module
import org.jetbrains.dokka.pages.ModulePageNode
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.transformers.documentation.DocumentablesToPageTranslator
+import org.jetbrains.dokka.utilities.DokkaLogger
-object DefaultDocumentablesToPageTranslator : DocumentablesToPageTranslator {
- override fun invoke(module: Module, context: DokkaContext): ModulePageNode =
+class DefaultDocumentablesToPageTranslator(
+ private val commentsToContentConverter: CommentsToContentConverter,
+ private val logger: DokkaLogger
+) : DocumentablesToPageTranslator {
+ override fun invoke(module: Module): ModulePageNode =
DefaultPageBuilder { node, kind, operation ->
DefaultPageContentBuilder.group(
setOf(node.dri),
node.platformData,
kind,
- context.single(CoreExtensions.commentsToContentConverter),
- context.logger,
+ commentsToContentConverter,
+ logger,
operation
)
}.pageForModule(module)
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/PageContentBuilder.kt b/plugins/base/src/main/kotlin/transformers/documentables/PageContentBuilder.kt
index 809b97a0..6ce883b1 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/PageContentBuilder.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/PageContentBuilder.kt
@@ -1,5 +1,6 @@
package org.jetbrains.dokka.base.transformers.documentables
+import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.model.Function