diff options
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r-- | core/src/main/kotlin/Formats/MarkdownFormatService.kt | 24 | ||||
-rw-r--r-- | core/src/main/kotlin/Formats/StructuredFormatService.kt | 13 |
2 files changed, 20 insertions, 17 deletions
diff --git a/core/src/main/kotlin/Formats/MarkdownFormatService.kt b/core/src/main/kotlin/Formats/MarkdownFormatService.kt index 4265394f..71356619 100644 --- a/core/src/main/kotlin/Formats/MarkdownFormatService.kt +++ b/core/src/main/kotlin/Formats/MarkdownFormatService.kt @@ -159,16 +159,20 @@ open class MarkdownOutputBuilder(to: StringBuilder, } override fun appendParagraph(body: () -> Unit) { - if (inTableCell) { - ensureNewline() - body() - } else if (listStack.isNotEmpty()) { - body() - ensureNewline() - } else { - ensureParagraph() - body() - ensureParagraph() + when { + inTableCell -> { + ensureNewline() + body() + } + listStack.isNotEmpty() -> { + body() + ensureNewline() + } + else -> { + ensureParagraph() + body() + ensureParagraph() + } } } diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt index 44b06e8b..a6c1b57f 100644 --- a/core/src/main/kotlin/Formats/StructuredFormatService.kt +++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt @@ -111,7 +111,7 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, open fun appendSinceKotlin(version: String) { appendParagraph { - appendText("Available since Kotlin: ") + appendText("Since: ") appendCode { appendText(version) } } } @@ -280,15 +280,13 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, protected open fun appendPlatformsAsText(platforms: PlatformsData) { if (platforms.isNotEmpty()) { - appendLine() - appendText(platforms.keys.joinToString(prefix = "(", postfix = ")")) + appendText(platforms.keys.joinToString(prefix = "(", postfix = ") ")) } } protected open fun appendPlatforms(platforms: PlatformsData) { if (platforms.isNotEmpty()) { - appendLine() - appendText(platforms.keys.joinToString(prefix = "(", postfix = ")")) + appendText(platforms.keys.joinToString(prefix = "(", postfix = ") ")) } } @@ -775,9 +773,10 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, appendPlatforms(platforms) } // appendHeader(level = 4) { - appendParagraph { +// appendParagraph { appendLink(memberLocation) - } + +// } // if (members.singleOrNull()?.kind != NodeKind.ExternalClass) { // appendPlatforms(platforms) // } |