From 0bf1d0f5491a62c56393a06cdfb4168778d9829e Mon Sep 17 00:00:00 2001 From: Kamil Doległo <9080183+kamildoleglo@users.noreply.github.com> Date: Mon, 5 Jul 2021 14:10:23 +0200 Subject: Flatten multi-module structure (#1980) * Add support for multimodule package lists * Merge package-lists in multi-module generation * Remove double-wrapping of modules in multi-module generation * Handle empty modules in package lists --- .../dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/gfm/gfm-template-processing/src/main') diff --git a/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt b/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt index 93ce9659..844f72a2 100644 --- a/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt +++ b/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt @@ -1,5 +1,6 @@ package org.jetbrains.dokka.gfm.templateProcessing +import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.allModulesPage.AllModulesPagePlugin import org.jetbrains.dokka.base.templating.parseJson import org.jetbrains.dokka.gfm.GfmCommand @@ -20,7 +21,7 @@ class GfmTemplateProcessingStrategy(val context: DokkaContext) : TemplateProcess private val externalModuleLinkResolver = context.plugin().querySingle { externalModuleLinkResolver } - override fun process(input: File, output: File): Boolean = + override fun process(input: File, output: File, moduleContext: DokkaConfiguration.DokkaModuleDescription?): Boolean = if (input.extension == "md") { input.bufferedReader().use { reader -> //This should also work whenever we have a misconfigured dokka and output is pointing to the input @@ -62,4 +63,4 @@ class GfmTemplateProcessingStrategy(val context: DokkaContext) : TemplateProcess externalModuleLinkResolver.resolve(dri, fileContext)?.let { address -> "[$label]($address)" } ?: label -} \ No newline at end of file +} -- cgit