aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-05-20 17:58:31 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-05-20 18:13:23 +0200
commit091294c5a920521df1b4bf61c2492b78f3559321 (patch)
treef00833367aca8f8bfdd6ec77495a40576e30d78e /plugins/base/src/main
parent885bf34ac6d9b9a5974cab35d9dd5a224b0ccc4c (diff)
downloaddokka-091294c5a920521df1b4bf61c2492b78f3559321.tar.gz
dokka-091294c5a920521df1b4bf61c2492b78f3559321.tar.bz2
dokka-091294c5a920521df1b4bf61c2492b78f3559321.zip
Tabs for sections - update tests
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt18
1 files changed, 10 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
index 409b0d6f..847e9667 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
@@ -202,7 +202,7 @@ open class DefaultPageCreator(
protected open fun contentForDescription(
d: Documentable
- ): ContentNode {
+ ): List<ContentNode> {
val tags: GroupedTags = d.documentation.flatMap { (pd, doc) ->
doc.children.asSequence().map { pd to it }.toList()
}.groupBy { it.second::class }
@@ -224,17 +224,19 @@ open class DefaultPageCreator(
val unnamedTags: List<SourceSetDependent<TagWrapper>> =
tags.filterNot { (k, _) -> k.isSubclassOf(NamedTagWrapper::class) || k in specialTags }
.map { (_, v) -> v.mapNotNull { (k,v) -> k?.let { it to v } }.toMap() }
- platforms.forEach { platform ->
- unnamedTags.forEach { pdTag ->
- pdTag[platform]?.also { tag ->
- group(sourceSets = setOf(platform)) {
- header(4, tag.toHeaderString())
- comment(tag.root)
+ if(unnamedTags.isNotEmpty()){
+ platforms.forEach { platform ->
+ unnamedTags.forEach { pdTag ->
+ pdTag[platform]?.also { tag ->
+ group(sourceSets = setOf(platform)) {
+ header(4, tag.toHeaderString())
+ comment(tag.root)
+ }
}
}
}
}
- }
+ }.children
}
protected open fun contentForComments(