diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt | 4 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt index 75034bda..9c22c879 100644 --- a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt @@ -7,7 +7,7 @@ import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.plugability.plugin import org.jetbrains.dokka.plugability.querySingle import org.jetbrains.dokka.renderers.Renderer -import org.jetbrains.dokka.transformers.pages.PageNodeTransformer +import org.jetbrains.dokka.transformers.pages.PageTransformer abstract class DefaultRenderer<T>( protected val context: DokkaContext @@ -18,7 +18,7 @@ abstract class DefaultRenderer<T>( protected lateinit var locationProvider: LocationProvider private set - protected open val preprocessors: Iterable<PageNodeTransformer> = emptyList() + protected open val preprocessors: Iterable<PageTransformer> = emptyList() abstract fun T.buildHeader(level: Int, content: T.() -> Unit) abstract fun T.buildLink(address: String, content: T.() -> Unit) diff --git a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt index ecd2e89a..9db0f2a8 100644 --- a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt +++ b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt @@ -6,14 +6,14 @@ import kotlinx.html.table import kotlinx.html.tbody import org.jetbrains.dokka.base.renderers.platforms import org.jetbrains.dokka.pages.* -import org.jetbrains.dokka.transformers.pages.PageNodeTransformer +import org.jetbrains.dokka.transformers.pages.PageTransformer -object RootCreator : PageNodeTransformer { +object RootCreator : PageTransformer { override fun invoke(input: RootPageNode) = RendererSpecificRootPage("", listOf(input), RenderingStrategy.DoNothing) } -object SearchPageInstaller : PageNodeTransformer { +object SearchPageInstaller : PageTransformer { override fun invoke(input: RootPageNode) = input.modified(children = input.children + searchPage) private val searchPage = RendererSpecificResourcePage( @@ -34,7 +34,7 @@ object SearchPageInstaller : PageNodeTransformer { }) } -object NavigationPageInstaller : PageNodeTransformer { +object NavigationPageInstaller : PageTransformer { override fun invoke(input: RootPageNode) = input.modified( children = input.children + NavigationPage( input.children.filterIsInstance<ContentPage>().single().let(::visit) @@ -48,7 +48,7 @@ object NavigationPageInstaller : PageNodeTransformer { page.children.filterIsInstance<ContentPage>().map { visit(it) }) } -object ResourceInstaller : PageNodeTransformer { +object ResourceInstaller : PageTransformer { override fun invoke(input: RootPageNode) = input.modified(children = input.children + resourcePages) private val resourcePages = listOf("styles", "scripts", "images").map { @@ -56,7 +56,7 @@ object ResourceInstaller : PageNodeTransformer { } } -object StyleAndScriptsAppender : PageNodeTransformer { +object StyleAndScriptsAppender : PageTransformer { override fun invoke(input: RootPageNode) = input.transformContentPagesTree { it.modified( embeddedResources = it.embeddedResources + listOf( |