From 076a5f421c5e4621539efd814be612f43fef33f5 Mon Sep 17 00:00:00 2001 From: Błażej Kardyś Date: Mon, 16 Nov 2020 19:46:31 +0100 Subject: Adding inter-module link resolving template strategy for Gfm --- .../templates/FallbackTemplateProcessingStrategy.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 plugins/all-module-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt (limited to 'plugins/all-module-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt') diff --git a/plugins/all-module-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt b/plugins/all-module-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt new file mode 100644 index 00000000..9b5251ac --- /dev/null +++ b/plugins/all-module-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt @@ -0,0 +1,18 @@ +package org.jetbrains.dokka.allModulesPage.templates + +import kotlinx.coroutines.Dispatchers.IO +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.launch +import org.jetbrains.dokka.plugability.DokkaContext +import java.io.File +import java.nio.file.Files + +class FallbackTemplateProcessingStrategy(dokkaContext: DokkaContext) : TemplateProcessingStrategy { + + override suspend fun process(input: File, output: File): Boolean = coroutineScope { + launch(IO) { + Files.copy(input.toPath(), output.toPath()) + } + true + } +} \ No newline at end of file -- cgit