aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-05-15 12:13:13 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-05-15 12:13:13 +0200
commitfd6c34d92b7409d3aedd9416c7b06f9c48fe2631 (patch)
tree4b1422c184ec578c8d9103bdba3e38fa756d984f /core/src/main
parentc605d0c2b75cce9ad8b818cfd75b49c684e2eb98 (diff)
downloaddokka-fd6c34d92b7409d3aedd9416c7b06f9c48fe2631.tar.gz
dokka-fd6c34d92b7409d3aedd9416c7b06f9c48fe2631.tar.bz2
dokka-fd6c34d92b7409d3aedd9416c7b06f9c48fe2631.zip
Fix SinceKotlin
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt22
1 files changed, 12 insertions, 10 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index a6c1b57f..e088b46d 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -110,10 +110,8 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
abstract fun appendText(text: String)
open fun appendSinceKotlin(version: String) {
- appendParagraph {
appendText("Since: ")
appendCode { appendText(version) }
- }
}
open fun appendSectionWithTag(section: ContentSection) {
@@ -279,9 +277,7 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
}
protected open fun appendPlatformsAsText(platforms: PlatformsData) {
- if (platforms.isNotEmpty()) {
- appendText(platforms.keys.joinToString(prefix = "(", postfix = ") "))
- }
+ appendPlatforms(platforms)
}
protected open fun appendPlatforms(platforms: PlatformsData) {
@@ -757,15 +753,14 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
appendTable("Name", "Summary") {
appendTableBody {
- for ((memberLocation, members) in membersMap) {
- val platforms = effectivePlatformsForMembers(members)
+ for ((memberLocation, membersList) in membersMap) {
+ val platforms = effectivePlatformsForMembers(membersList)
// val platforms = if (platformsBasedOnMembers)
// members.flatMapTo(mutableSetOf()) { platformsOfItems(it.members) } + elementPlatforms
// else
// elementPlatforms
- val summarized = computeSummarySignatures(members)
-
+ val summarized = computeSummarySignatures(membersList)
appendIndexRow(platforms) {
appendTableCell {
@@ -774,8 +769,15 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
}
// appendHeader(level = 4) {
// appendParagraph {
- appendLink(memberLocation)
+ appendLink(memberLocation)
+
+ if (node.sinceKotlin != null) {
+ appendSinceKotlin(node.sinceKotlin.toString())
+ }
+ if (membersList.singleOrNull()?.sinceKotlin != null){
+ wrap(" (", ")"){ appendSinceKotlin(membersList.single().sinceKotlin.toString()) }
+ }
// }
// if (members.singleOrNull()?.kind != NodeKind.ExternalClass) {
// appendPlatforms(platforms)