diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-06-21 17:25:48 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-06-21 17:25:48 +0200 |
commit | e9a40280ad49cc471143c0be6807b7cd4033b52c (patch) | |
tree | 96ac1ba04eba87e93378a912717ca98cd910dfb7 /core/src | |
parent | 26b05e709bb025da3d65e739c211aa0fb6350999 (diff) | |
download | dokka-e9a40280ad49cc471143c0be6807b7cd4033b52c.tar.gz dokka-e9a40280ad49cc471143c0be6807b7cd4033b52c.tar.bz2 dokka-e9a40280ad49cc471143c0be6807b7cd4033b52c.zip |
Fix format in KotlinWebsiteHtml, markdown format changed slightly
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) } } |