diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-02-05 10:21:49 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-02-12 11:22:46 +0100 |
commit | 0d430649e966454e808874d7555340be5496ca9d (patch) | |
tree | 7431d528eac6e3f0d0db8dcf478ac213200ccf00 /core/src/main/kotlin/plugability/DefaultExtensions.kt | |
parent | 6bdb6102ace122fd2a9ee8743866033ac9c94777 (diff) | |
download | dokka-0d430649e966454e808874d7555340be5496ca9d.tar.gz dokka-0d430649e966454e808874d7555340be5496ca9d.tar.bz2 dokka-0d430649e966454e808874d7555340be5496ca9d.zip |
Cleans up file extension redundancy
Diffstat (limited to 'core/src/main/kotlin/plugability/DefaultExtensions.kt')
-rw-r--r-- | core/src/main/kotlin/plugability/DefaultExtensions.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/main/kotlin/plugability/DefaultExtensions.kt b/core/src/main/kotlin/plugability/DefaultExtensions.kt index c62bdd41..029d21de 100644 --- a/core/src/main/kotlin/plugability/DefaultExtensions.kt +++ b/core/src/main/kotlin/plugability/DefaultExtensions.kt @@ -3,6 +3,7 @@ package org.jetbrains.dokka.plugability import org.jetbrains.dokka.CoreExtensions import org.jetbrains.dokka.pages.DocTagToContentConverter import org.jetbrains.dokka.renderers.FileWriter +import org.jetbrains.dokka.renderers.OutputWriter import org.jetbrains.dokka.renderers.html.HtmlRenderer import org.jetbrains.dokka.resolvers.DefaultLocationProviderFactory import org.jetbrains.dokka.transformers.descriptors.DefaultDescriptorToDocumentationTranslator @@ -20,7 +21,7 @@ internal object DefaultExtensions { } private val converter: LazyEvaluated<DocTagToContentConverter> = LazyEvaluated.fromRecipe { DocTagToContentConverter(it) } private val providerFactory: LazyEvaluated<DefaultLocationProviderFactory> = LazyEvaluated.fromRecipe { DefaultLocationProviderFactory(it) } - + private val outputWriter: LazyEvaluated<OutputWriter> = LazyEvaluated.fromRecipe { FileWriter(it) } @Suppress("IMPLICIT_CAST_TO_ANY", "UNCHECKED_CAST") internal fun <T : Any, E : ExtensionPoint<T>> get(point: E, fullContext: DokkaContext): List<T> = @@ -32,7 +33,7 @@ internal object DefaultExtensions { CoreExtensions.documentationToPageTranslator -> DefaultDocumentationToPageTranslator CoreExtensions.renderer -> renderer.get(fullContext) CoreExtensions.locationProviderFactory -> providerFactory.get(fullContext) - CoreExtensions.outputWriter -> FileWriter(fullContext, "") + CoreExtensions.outputWriter -> outputWriter.get(fullContext) CoreExtensions.fileExtension -> ".html" else -> null }.let { listOfNotNull( it ) as List<T> } |