aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authoraleksZubakov <aleks.zubakov@gmail.com>2018-10-01 21:24:12 +0300
committeraleksZubakov <aleks.zubakov@gmail.com>2018-10-01 21:24:12 +0300
commit25381f71922b8aa665e8c9ceaca58785237cfdba (patch)
tree47ef8a413a5cb9bf5ab243d6339f161bb43c9561 /core
parentf4ffd392a5673980c6c1bf77ed23efa53c10a628 (diff)
downloaddokka-25381f71922b8aa665e8c9ceaca58785237cfdba.tar.gz
dokka-25381f71922b8aa665e8c9ceaca58785237cfdba.tar.bz2
dokka-25381f71922b8aa665e8c9ceaca58785237cfdba.zip
Fixed duplicated descriptions
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt22
1 files changed, 11 insertions, 11 deletions
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<String>
// 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)
}
}