diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/kotlin/Formats/MarkdownFormatService.kt | 15 | ||||
-rw-r--r-- | core/src/main/kotlin/Formats/StructuredFormatService.kt | 10 |
2 files changed, 16 insertions, 9 deletions
diff --git a/core/src/main/kotlin/Formats/MarkdownFormatService.kt b/core/src/main/kotlin/Formats/MarkdownFormatService.kt index 71356619..216dd2ef 100644 --- a/core/src/main/kotlin/Formats/MarkdownFormatService.kt +++ b/core/src/main/kotlin/Formats/MarkdownFormatService.kt @@ -177,10 +177,17 @@ open class MarkdownOutputBuilder(to: StringBuilder, } override fun appendHeader(level: Int, body: () -> Unit) { - ensureParagraph() - to.append("${"#".repeat(level)} ") - body() - ensureParagraph() + when { + inTableCell -> { + body() + } + else -> { + ensureParagraph() + to.append("${"#".repeat(level)} ") + body() + ensureParagraph() + } + } } override fun appendBlockCode(language: String, body: () -> Unit) { diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt index 264a176d..62ea1108 100644 --- a/core/src/main/kotlin/Formats/StructuredFormatService.kt +++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt @@ -767,10 +767,10 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, if (summarized.platformPlacement == Summarized.PlatformPlacement.Row) { appendPlatforms(platforms) } -// appendHeader(level = 4) { -// appendParagraph { - appendLink(memberLocation) - + appendHeader(level = 4) { + // appendParagraph { + appendLink(memberLocation) + } if (node.sinceKotlin != null) { appendSinceKotlin(node.sinceKotlin.toString()) } @@ -832,6 +832,7 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, if (summarized.platformPlacement == Summarized.PlatformPlacement.Summary) { appendPlatforms(summary.platforms) } + appendContent(summary.content) summary.signatures.subList(0, summary.signatures.size - 1).forEach { appendSignatures( it, @@ -843,7 +844,6 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, summary.signatures.last(), summarized.platformPlacement == Summarized.PlatformPlacement.Signature ) - appendContent(summary.content) } } |