diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/Formats/StructuredFormatService.kt | 22 | ||||
-rw-r--r-- | core/src/test/kotlin/DokkaConfigurationTestImplementations.kt | 2 | ||||
-rw-r--r-- | core/testdata/format/sinceKotlin.html | 2 | ||||
-rw-r--r-- | core/testdata/format/sinceKotlin.md | 2 | ||||
-rw-r--r-- | core/testdata/format/sinceKotlin.package.md | 6 | ||||
-rw-r--r-- | core/testdata/format/sinceKotlinWide.package.md | 4 |
6 files changed, 19 insertions, 19 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) diff --git a/core/src/test/kotlin/DokkaConfigurationTestImplementations.kt b/core/src/test/kotlin/DokkaConfigurationTestImplementations.kt index 19ec1e64..a6f427b1 100644 --- a/core/src/test/kotlin/DokkaConfigurationTestImplementations.kt +++ b/core/src/test/kotlin/DokkaConfigurationTestImplementations.kt @@ -65,7 +65,7 @@ class PassConfigurationImpl ( override val collectInheritedExtensionsFromLibraries: Boolean = false, override val analysisPlatform: Platform = Platform.DEFAULT, override val targets: List<String> = emptyList(), - override val sinceKotlin: String = "1.0" + override val sinceKotlin: String? = null ): DokkaConfiguration.PassConfiguration { private val defaultLinks = run { val links = mutableListOf<DokkaConfiguration.ExternalDocumentationLink>() diff --git a/core/testdata/format/sinceKotlin.html b/core/testdata/format/sinceKotlin.html index 12cdd87f..1173a8ab 100644 --- a/core/testdata/format/sinceKotlin.html +++ b/core/testdata/format/sinceKotlin.html @@ -14,7 +14,7 @@ <tbody> <tr> <td> -<a href="-init-.html"><init></a></td> +<a href="-init-.html"><init></a>Since: <code>1.1</code></td> <td> <code><span class="identifier">Since1.1</span><span class="symbol">(</span><span class="symbol">)</span></code> <p>Useful</p> diff --git a/core/testdata/format/sinceKotlin.md b/core/testdata/format/sinceKotlin.md index 188784d6..e9b29229 100644 --- a/core/testdata/format/sinceKotlin.md +++ b/core/testdata/format/sinceKotlin.md @@ -8,5 +8,5 @@ Useful ### Constructors -| [<init>](-init-.md) | `Since1.1()`<br>Useful | +| [<init>](-init-.md)Since: `1.1` | `Since1.1()`<br>Useful | diff --git a/core/testdata/format/sinceKotlin.package.md b/core/testdata/format/sinceKotlin.package.md index eabf88d5..92197648 100644 --- a/core/testdata/format/sinceKotlin.package.md +++ b/core/testdata/format/sinceKotlin.package.md @@ -1,10 +1,8 @@ -[test](./index.md) +[test](../index.md) ## Package <root> -**Platform and version requirements:** Kotlin 1.1 - ### Types -| [Since1.1](-since1.1/index.md)<br>(Kotlin 1.1) | `class Since1.1`<br>Useful | +| [Since1.1](-since1.1/index.md) (Since: `1.1`) | `class Since1.1`<br>Useful | diff --git a/core/testdata/format/sinceKotlinWide.package.md b/core/testdata/format/sinceKotlinWide.package.md index d2c2b6d8..fd7d45aa 100644 --- a/core/testdata/format/sinceKotlinWide.package.md +++ b/core/testdata/format/sinceKotlinWide.package.md @@ -4,6 +4,6 @@ ### Types -| [Since1.1](-since1.1/index.md)<br>(Kotlin 1.1) | `class Since1.1`<br>Useful | -| [Since1.2](-since1.2/index.md)<br>(Kotlin 1.2) | `class Since1.2`<br>Useful also | +| [Since1.1](-since1.1/index.md) (Since: `1.1`) | `class Since1.1`<br>Useful | +| [Since1.2](-since1.2/index.md) (Since: `1.2`) | `class Since1.2`<br>Useful also | |