aboutsummaryrefslogtreecommitdiff
path: root/plugins/all-module-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-11-16 19:46:31 +0100
committerBłażej Kardyś <bkardys@virtuslab.com>2020-11-27 03:15:02 +0100
commit076a5f421c5e4621539efd814be612f43fef33f5 (patch)
tree90b399c459cccbd1e3010778320d49b7b806b1fb /plugins/all-module-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt
parentc203be9fb65ee221875b4e1c865bcd289a85e69c (diff)
downloaddokka-076a5f421c5e4621539efd814be612f43fef33f5.tar.gz
dokka-076a5f421c5e4621539efd814be612f43fef33f5.tar.bz2
dokka-076a5f421c5e4621539efd814be612f43fef33f5.zip
Adding inter-module link resolving template strategy for Gfm
Diffstat (limited to 'plugins/all-module-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt')
-rw-r--r--plugins/all-module-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt18
1 files changed, 18 insertions, 0 deletions
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