aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt6
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt21
2 files changed, 18 insertions, 9 deletions
diff --git a/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt b/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt
index 220f2f4d..65c93e72 100644
--- a/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt
+++ b/core/src/main/kotlin/Formats/KotlinWebsiteHtmlFormatService.kt
@@ -206,6 +206,12 @@ open class KotlinWebsiteHtmlOutputBuilder(
else
block(platforms)
}
+
+ override fun appendAsSummaryGroup(platforms: Set<String>, block: (Set<String>) -> Unit) {
+ div(to, "summary-group", otherAttributes = " ${calculateDataAttributes(platforms)}") {
+ block(platforms)
+ }
+ }
}
class KotlinWebsiteHtmlFormatService @Inject constructor(
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index 764fd50e..647f2dfb 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -129,6 +129,10 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
block(platforms)
}
+ open fun appendAsSummaryGroup(platforms: Set<String>, block: (Set<String>) -> Unit) {
+ appendAsPlatformDependentBlock(platforms, block)
+ }
+
open fun appendSymbol(text: String) {
appendText(text)
}
@@ -787,21 +791,20 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
) {
for(summary in summarized.data) {
-
-
- appendAsPlatformDependentBlock(summary.platforms) {
+ appendAsSummaryGroup(summary.platforms) {
if (summarized.platformPlacement == Summarized.PlatformPlacement.Summary) {
appendPlatforms(summary.platforms)
}
appendContent(summary.content)
appendSoftLineBreak()
+ for (signature in summary.signatures) {
+ appendSignatures(
+ signature,
+ summarized.platformPlacement == Summarized.PlatformPlacement.Signature
+ )
+ }
}
- for (signature in summary.signatures) {
- appendSignatures(
- signature,
- summarized.platformPlacement == Summarized.PlatformPlacement.Signature
- )
- }
+
}
}