aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index 282ea7d6..f989fad6 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -381,8 +381,15 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
private fun formatOverloadGroup(items: List<DocumentationNode>, isSingleNode: Boolean = false) {
val platformsPerGroup = samePlatforms(
- items.flatMap { if (it.kind == NodeKind.GroupNode) it.origins else listOf(it) }
- .map { effectivePlatformsForNode(it) }
+ items.flatMap {
+ if (it.kind == NodeKind.GroupNode) {
+ it.origins.groupBy { origin ->
+ languageService.render(origin)
+ }.values.map { origins -> effectivePlatformsForMembers(origins) }
+ } else {
+ listOf(effectivePlatformsForNode(it))
+ }
+ }
)
if (platformsPerGroup) {