aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers/pages
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-08-21 12:46:39 +0200
committerAndrzej Ratajczak <32793002+BarkingBad@users.noreply.github.com>2020-09-08 12:52:59 +0200
commit956e5ff3b21290d536b45f2a185f419416eb5554 (patch)
tree3dfa23170f4443b83d12cdfab4d3f69b538f4e26 /plugins/base/src/main/kotlin/transformers/pages
parent337c72c547505422c3b047869a65790a14b9a9ea (diff)
downloaddokka-956e5ff3b21290d536b45f2a185f419416eb5554.tar.gz
dokka-956e5ff3b21290d536b45f2a185f419416eb5554.tar.bz2
dokka-956e5ff3b21290d536b45f2a185f419416eb5554.zip
Handle same level declared expected classlikes
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/pages')
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt b/plugins/base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt
index df0c27ee..8698e84b 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/merger/FallbackPageMergerStrategy.kt
@@ -1,10 +1,14 @@
package org.jetbrains.dokka.base.transformers.pages.merger
+import org.jetbrains.dokka.pages.ContentPage
import org.jetbrains.dokka.pages.PageNode
import org.jetbrains.dokka.utilities.DokkaLogger
class FallbackPageMergerStrategy(private val logger: DokkaLogger) : PageMergerStrategy {
override fun tryMerge(pages: List<PageNode>, path: List<String>): List<PageNode> {
+ pages.map {
+ (it as? ContentPage)
+ }
val renderedPath = path.joinToString(separator = "/")
if (pages.size != 1) logger.warn("For $renderedPath: expected 1 page, but got ${pages.size}")
return listOf(pages.first())