aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt4
-rw-r--r--plugins/base/src/main/resources/dokka/styles/style.css3
-rw-r--r--plugins/javadoc/src/main/kotlin/javadoc/JavadocPageCreator.kt14
3 files changed, 13 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
index 8c7707f8..ecc7cf1a 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
@@ -370,8 +370,8 @@ open class DefaultPageCreator(
}.run {
documentable.sourceSets.forEach { sourceSet ->
this[sourceSet]?.also { tag ->
- group(sourceSets = setOf(sourceSet)) {
- header(4, (tag as CustomTagWrapper).name)
+ group(sourceSets = setOf(sourceSet), kind = ContentKind.Comment, styles = setOf(TextStyle.Block)) {
+ header(4, tag.name)
comment(tag.root)
}
}
diff --git a/plugins/base/src/main/resources/dokka/styles/style.css b/plugins/base/src/main/resources/dokka/styles/style.css
index 118d247a..4acf6cb2 100644
--- a/plugins/base/src/main/resources/dokka/styles/style.css
+++ b/plugins/base/src/main/resources/dokka/styles/style.css
@@ -816,7 +816,8 @@ td.content {
}
.brief-with-platform-tags {
- display: inline-block;
+ display: flex;
+ flex-direction: column;
width: 100%;
}
diff --git a/plugins/javadoc/src/main/kotlin/javadoc/JavadocPageCreator.kt b/plugins/javadoc/src/main/kotlin/javadoc/JavadocPageCreator.kt
index b4bc19ca..53292225 100644
--- a/plugins/javadoc/src/main/kotlin/javadoc/JavadocPageCreator.kt
+++ b/plugins/javadoc/src/main/kotlin/javadoc/JavadocPageCreator.kt
@@ -14,6 +14,7 @@ import org.jetbrains.dokka.model.doc.Text
import org.jetbrains.dokka.model.properties.PropertyContainer
import org.jetbrains.dokka.model.properties.WithExtraProperties
import org.jetbrains.dokka.pages.ContentKind
+import org.jetbrains.dokka.pages.ContentNode
import org.jetbrains.dokka.pages.DCI
import org.jetbrains.dokka.utilities.DokkaLogger
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
@@ -45,20 +46,20 @@ open class JavadocPageCreator(
content = contentForClasslike(c),
dri = setOf(c.dri),
modifiers = listOfNotNull(c.visibility[jvm]?.name),
- signature = signatureProvider.signature(c),
+ signature = signatureProvider.signature(c).jvmSignature(),
description = c.description(jvm),
constructors = c.safeAs<WithConstructors>()?.constructors?.map { it.toJavadocFunction(jvm) }.orEmpty(),
methods = c.functions.map { it.toJavadocFunction(jvm) },
entries = c.safeAs<DEnum>()?.entries?.map {
JavadocEntryNode(
- signatureProvider.signature(it),
+ signatureProvider.signature(it).jvmSignature(),
it.description(jvm)
)
}.orEmpty(),
classlikes = c.classlikes.mapNotNull { pageForClasslike(it) },
properties = c.properties.map {
JavadocPropertyNode(
- signatureProvider.signature(it),
+ signatureProvider.signature(it).jvmSignature(),
TextNode(it.description(jvm), setOf(jvm))
)
},
@@ -101,7 +102,7 @@ open class JavadocPageCreator(
list("Packages", "Package", setOf(p.dri), ContentKind.Packages, p.classlikes.sortedBy { it.name }.map { c ->
RowJavadocListEntry(
LinkJavadocListEntry(c.name.orEmpty(), setOf(c.dri), JavadocContentKind.Class, sourceSets),
- listOf(signatureProvider.signature(c))
+ listOf(signatureProvider.signature(c).jvmSignature())
)
})
}
@@ -147,7 +148,7 @@ open class JavadocPageCreator(
private fun DFunction.toJavadocFunction(sourceSetData: SourceSetData) = JavadocFunctionNode(
name = name,
- signature = signatureProvider.signature(this),
+ signature = signatureProvider.signature(this).jvmSignature(),
brief = TextNode(description(sourceSetData), setOf(sourceSetData)),
parameters = parameters.map {
JavadocParameterNode(
@@ -159,6 +160,9 @@ open class JavadocPageCreator(
extras = extra
)
+ fun List<ContentNode>.jvmSignature(): ContentNode =
+ first { it.sourceSets.any { it.platform == Platform.jvm } }
+
private fun Documentable.description(sourceSetData: SourceSetData): String =
findNodeInDocumentation<Description>(sourceSetData)