From 25381f71922b8aa665e8c9ceaca58785237cfdba Mon Sep 17 00:00:00 2001 From: aleksZubakov Date: Mon, 1 Oct 2018 21:24:12 +0300 Subject: Fixed duplicated descriptions --- .../main/kotlin/Formats/StructuredFormatService.kt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'core') diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt index fffa9e3e..7e21c30c 100644 --- a/core/src/main/kotlin/Formats/StructuredFormatService.kt +++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt @@ -384,9 +384,8 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, val platforms = effectivePlatformsForMembers(origins) appendAsPlatformDependentBlock(platforms) { appendPlatforms(platforms) - appendParagraph { - appendContent(content) - } + appendContent(content.summary) + content.appendDescription() } } } else { @@ -394,12 +393,11 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, val platforms = effectivePlatformsForNode(item) appendAsPlatformDependentBlock(platforms) { appendPlatforms(platforms) - appendContent(item.content) + appendContent(item.summary) + item.content.appendDescription() } } } - - item.appendDescription() } @@ -561,15 +559,17 @@ abstract class StructuredOutputBuilder(val to: StringBuilder, // val DocumentationNode.platformsToShow: List // get() = platforms - private fun DocumentationNode.appendDescription() { - if (content.description != ContentEmpty) { - appendContent(content.description) + private fun Content.appendDescription() { + if (description != ContentEmpty) { + appendContent(description) } - content.getSectionsWithSubjects().forEach { + + + getSectionsWithSubjects().forEach { appendSectionWithSubject(it.key, it.value) } - for (section in content.sections.filter { it.subjectName == null }) { + for (section in sections.filter { it.subjectName == null }) { appendSectionWithTag(section) } } -- cgit