aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-01-21 00:34:43 +0100
committerGitHub <noreply@github.com>2021-01-21 00:34:43 +0100
commitfdf8a298f586d7e334c312346b70b59c64c8d037 (patch)
treed9e92e920c24f442df6339e19b27225d7d01d21b /plugins/base/src/main/kotlin/renderers
parent1f592a7ec2786e0a0b77d224d1414ef3042caae4 (diff)
downloaddokka-fdf8a298f586d7e334c312346b70b59c64c8d037.tar.gz
dokka-fdf8a298f586d7e334c312346b70b59c64c8d037.tar.bz2
dokka-fdf8a298f586d7e334c312346b70b59c64c8d037.zip
Empty modules filtering (#1699)
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers')
-rw-r--r--plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt21
1 files changed, 14 insertions, 7 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
index d76ba597..2694adc9 100644
--- a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
@@ -7,7 +7,6 @@ import kotlinx.coroutines.runBlocking
import org.jetbrains.dokka.DokkaException
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.resolvers.local.LocationProvider
-import org.jetbrains.dokka.base.resolvers.local.resolveOrThrow
import org.jetbrains.dokka.model.DisplaySourceSet
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.plugability.DokkaContext
@@ -169,12 +168,20 @@ abstract class DefaultRenderer<T>(
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), ".html")
- is RenderingStrategy.DriLocationResolvableWrite -> outputWriter.write(path, strategy.contentToResolve { dri, sourcesets ->
- locationProvider.resolve(dri, sourcesets)
- }, "")
- is RenderingStrategy.PageLocationResolvableWrite -> outputWriter.write(path, strategy.contentToResolve { pageToLocate, context ->
- locationProvider.resolve(pageToLocate, context)
- }, "")
+ is RenderingStrategy.DriLocationResolvableWrite -> outputWriter.write(
+ path,
+ strategy.contentToResolve { dri, sourcesets ->
+ locationProvider.resolve(dri, sourcesets)
+ },
+ ""
+ )
+ is RenderingStrategy.PageLocationResolvableWrite -> outputWriter.write(
+ path,
+ strategy.contentToResolve { pageToLocate, context ->
+ locationProvider.resolve(pageToLocate, context)
+ },
+ ""
+ )
RenderingStrategy.DoNothing -> Unit
}
else -> throw AssertionError(