diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-02-11 15:33:37 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-02-12 11:22:46 +0100 |
commit | 5a432c9c62ff95779a495fb354c83f5f7c481a1d (patch) | |
tree | 7d6742eba4b650777745a838bd27a9c7767404a5 /core/src/main/kotlin/renderers | |
parent | 0d430649e966454e808874d7555340be5496ca9d (diff) | |
download | dokka-5a432c9c62ff95779a495fb354c83f5f7c481a1d.tar.gz dokka-5a432c9c62ff95779a495fb354c83f5f7c481a1d.tar.bz2 dokka-5a432c9c62ff95779a495fb354c83f5f7c481a1d.zip |
Removed default file extension extension point
Diffstat (limited to 'core/src/main/kotlin/renderers')
-rw-r--r-- | core/src/main/kotlin/renderers/DefaultRenderer.kt | 4 | ||||
-rw-r--r-- | core/src/main/kotlin/renderers/FileWriter.kt | 2 | ||||
-rw-r--r-- | core/src/main/kotlin/renderers/OutputWriter.kt | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/core/src/main/kotlin/renderers/DefaultRenderer.kt b/core/src/main/kotlin/renderers/DefaultRenderer.kt index 4b4d6fd3..16cdb4c1 100644 --- a/core/src/main/kotlin/renderers/DefaultRenderer.kt +++ b/core/src/main/kotlin/renderers/DefaultRenderer.kt @@ -75,11 +75,11 @@ abstract class DefaultRenderer<T>( open fun renderPage(page: PageNode) { val path by lazy { locationProvider.resolve(page, skipExtension = true) } when (page) { - is ContentPage -> outputWriter.write(path, buildPage(page) { c, p -> buildPageContent(c, p) }) + is ContentPage -> outputWriter.write(path, buildPage(page) { c, p -> buildPageContent(c, p) }, ".html") is RendererSpecificPage -> when (val strategy = page.strategy) { is RenderingStrategy.Copy -> outputWriter.writeResources(strategy.from, path) is RenderingStrategy.Write -> outputWriter.write(path, strategy.text, "") - is RenderingStrategy.Callback -> outputWriter.write(path, strategy.instructions(this, page)) + is RenderingStrategy.Callback -> outputWriter.write(path, strategy.instructions(this, page), ".html") RenderingStrategy.DoNothing -> Unit } else -> throw AssertionError( diff --git a/core/src/main/kotlin/renderers/FileWriter.kt b/core/src/main/kotlin/renderers/FileWriter.kt index 83bb9ce3..727a8d21 100644 --- a/core/src/main/kotlin/renderers/FileWriter.kt +++ b/core/src/main/kotlin/renderers/FileWriter.kt @@ -6,7 +6,7 @@ import java.io.IOException import java.net.URI import java.nio.file.* -class FileWriter(override val context: DokkaContext): OutputWriter { +class FileWriter(val context: DokkaContext): OutputWriter { private val createdFiles: MutableSet<String> = mutableSetOf() private val jarUriPrefix = "jar:file:" private val root = context.configuration.outputDir diff --git a/core/src/main/kotlin/renderers/OutputWriter.kt b/core/src/main/kotlin/renderers/OutputWriter.kt index b2059aa3..30b2b0b6 100644 --- a/core/src/main/kotlin/renderers/OutputWriter.kt +++ b/core/src/main/kotlin/renderers/OutputWriter.kt @@ -6,10 +6,6 @@ import org.jetbrains.dokka.plugability.single interface OutputWriter { - val context: DokkaContext - val extension: String - get() = context.single(CoreExtensions.fileExtension) - - fun write(path: String, text: String, ext: String = extension) + fun write(path: String, text: String, ext: String) fun writeResources(pathFrom: String, pathTo: String) }
\ No newline at end of file |