From 810fce90353f044de1531a2cf5b340ff7732b083 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Wed, 3 Oct 2018 22:25:11 +0300 Subject: Use headers instead of paragraphs for section declaration block title --- .../main/kotlin/Formats/StructuredFormatService.kt | 28 ++++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'core/src/main') diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt index 98414695..282ea7d6 100644 --- a/core/src/main/kotlin/Formats/StructuredFormatService.kt +++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt @@ -763,7 +763,7 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, if (summarized.platformPlacement == Summarized.PlatformPlacement.Row) { appendPlatforms(platforms) } - appendParagraph { + appendHeader(level = 4) { appendLink(memberLocation) // if (members.singleOrNull()?.kind != NodeKind.ExternalClass) { // appendPlatforms(platforms) @@ -871,27 +871,23 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, appendTable("Name", "Summary") { appendTableBody { for (type in node.members) { - appendTableRow { - appendTableCell { + val platforms = effectivePlatformsForNode(type) + appendIndexRow(platforms) { + appendPlatforms(platforms) + appendHeader(level = 5) { appendLink(link(node, type) { if (it.kind == NodeKind.ExternalClass) it.name else it.qualifiedName() }) - if (type.kind == NodeKind.ExternalClass) { - val packageName = type.owner?.name - if (packageName != null) { - appendText(" (extensions in package $packageName)") - } - } } - appendTableCell { - val summary = if (type.isClassLikeGroupNode()) { - type.origins.first().summary - } else { - type.summary - } - appendContent(summary) + if (type.kind == NodeKind.ExternalClass) { + val packageName = type.owner?.name + if (packageName != null) { + appendText(" (extensions in package $packageName)") + } } + + appendContent(type.summary) } } } -- cgit