diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-10-03 07:59:04 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-10-03 07:59:04 +0300 |
commit | 7d4e133fa46b9ab358472398ae03cbefbf49d9e3 (patch) | |
tree | 7d9236329f70cbe8a08698a4766ded40c4d765d7 /core | |
parent | c795ce373c20b9279d7de9e23202e0eab0eb1409 (diff) | |
download | dokka-7d4e133fa46b9ab358472398ae03cbefbf49d9e3.tar.gz dokka-7d4e133fa46b9ab358472398ae03cbefbf49d9e3.tar.bz2 dokka-7d4e133fa46b9ab358472398ae03cbefbf49d9e3.zip |
Correctly lookup summary for group nodes
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/Model/DocumentationNode.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt index 5607c6d3..84f9a453 100644 --- a/core/src/main/kotlin/Model/DocumentationNode.kt +++ b/core/src/main/kotlin/Model/DocumentationNode.kt @@ -77,7 +77,10 @@ open class DocumentationNode(val name: String, private set val summary: ContentNode get() = when (kind) { - NodeKind.GroupNode -> this.origins.first().summary + NodeKind.GroupNode -> this.origins + .map { it.content } + .firstOrNull { !it.isEmpty() } + ?.summary ?: ContentEmpty else -> content.summary } |