aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/renderers
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/renderers')
-rw-r--r--core/src/main/kotlin/renderers/DefaultRenderer.kt7
-rw-r--r--core/src/main/kotlin/renderers/HtmlRenderer.kt7
-rw-r--r--core/src/main/kotlin/renderers/Renderer.kt1
3 files changed, 13 insertions, 2 deletions
diff --git a/core/src/main/kotlin/renderers/DefaultRenderer.kt b/core/src/main/kotlin/renderers/DefaultRenderer.kt
index 3b16c093..3f851849 100644
--- a/core/src/main/kotlin/renderers/DefaultRenderer.kt
+++ b/core/src/main/kotlin/renderers/DefaultRenderer.kt
@@ -1,9 +1,14 @@
package org.jetbrains.dokka.renderers
import org.jetbrains.dokka.pages.*
+import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.resolvers.LocationProvider
-abstract class DefaultRenderer(val fileWriter: FileWriter, val locationProvider: LocationProvider) : Renderer {
+abstract class DefaultRenderer(
+ protected val fileWriter: FileWriter,
+ protected val locationProvider: LocationProvider,
+ protected val context: DokkaContext
+) : Renderer {
protected abstract fun buildHeader(level: Int, text: String): String
protected abstract fun buildLink(text: String, address: String): String
diff --git a/core/src/main/kotlin/renderers/HtmlRenderer.kt b/core/src/main/kotlin/renderers/HtmlRenderer.kt
index 3b778671..46548699 100644
--- a/core/src/main/kotlin/renderers/HtmlRenderer.kt
+++ b/core/src/main/kotlin/renderers/HtmlRenderer.kt
@@ -2,13 +2,18 @@ package org.jetbrains.dokka.renderers
import org.jetbrains.dokka.htmlEscape
import org.jetbrains.dokka.pages.*
+import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.resolvers.LocationProvider
import java.io.File
import java.net.URL
import java.nio.file.Path
import java.nio.file.Paths
-open class HtmlRenderer(fileWriter: FileWriter, locationProvider: LocationProvider) : DefaultRenderer(fileWriter, locationProvider) {
+open class HtmlRenderer(
+ fileWriter: FileWriter,
+ locationProvider: LocationProvider,
+ context: DokkaContext
+) : DefaultRenderer(fileWriter, locationProvider, context) {
override fun buildList(node: ContentList, pageContext: PageNode): String = if (node.ordered) {
"<ol>${buildListItems(node.children, pageContext)}</ol>"
diff --git a/core/src/main/kotlin/renderers/Renderer.kt b/core/src/main/kotlin/renderers/Renderer.kt
index 24e01cdb..91483a46 100644
--- a/core/src/main/kotlin/renderers/Renderer.kt
+++ b/core/src/main/kotlin/renderers/Renderer.kt
@@ -1,6 +1,7 @@
package org.jetbrains.dokka.renderers
import org.jetbrains.dokka.pages.PageNode
+import org.jetbrains.dokka.plugability.DokkaContext
interface Renderer {
fun render(root: PageNode)