diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-10-02 16:19:05 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-10-02 16:19:05 +0300 |
commit | 52d3e0e0de74c951651b6f3c9970d0ded7e15e1a (patch) | |
tree | 4278c2db89bc57e022651c19957a3c584ae3d783 /core | |
parent | 0f19897ef9de71f571b1af703ac33923640cb547 (diff) | |
download | dokka-52d3e0e0de74c951651b6f3c9970d0ded7e15e1a.tar.gz dokka-52d3e0e0de74c951651b6f3c9970d0ded7e15e1a.tar.bz2 dokka-52d3e0e0de74c951651b6f3c9970d0ded7e15e1a.zip |
Fix platform display for group node overloads
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/Formats/StructuredFormatService.kt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt index 67e8c503..764fd50e 100644 --- a/core/src/main/kotlin/Formats/StructuredFormatService.kt +++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt @@ -379,11 +379,13 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, } if (item.kind == NodeKind.GroupNode) { - for ((content, origins) in item.origins.groupBy { it.content }) { + val groupByContent = item.origins.groupBy { it.content } + for ((content, origins) in groupByContent) { if (content.isEmpty()) continue - val platforms = effectivePlatformsForMembers(origins) - appendAsPlatformDependentBlock(platforms) { - appendPlatforms(platforms) + appendAsPlatformDependentBlock(effectivePlatformsForMembers(origins)) { platforms -> + if (groupByContent.count { !it.key.isEmpty() } > 1) { + appendPlatforms(platforms) + } appendContent(content.summary) content.appendDescription() } |