From cf5b1aff6e7bb51414f80ff71f8d2feeb9e5fb9f Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Mon, 8 Jun 2020 11:34:15 +0200 Subject: Fix after rebase --- .../kotlin/signatures/KotlinSignatureProvider.kt | 38 ++++++++++------------ .../base/src/main/resources/dokka/styles/style.css | 1 + 2 files changed, 19 insertions(+), 20 deletions(-) (limited to 'plugins/base/src/main') diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt index 04818ebb..a444d192 100644 --- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt +++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt @@ -94,26 +94,24 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog +buildSignature(it) } } - if (c is DClass) { - if (c is WithConstructors) { - val pConstructor = c.constructors.singleOrNull { it.extra[PrimaryConstructorExtra] != null } - if (pConstructor?.annotations()?.isNotEmpty() == true) { - text(nbsp.toString()) - annotationsInline(pConstructor) - text("constructor") - } - list( - pConstructor?.parameters.orEmpty(), - "(", - ")", - ",", - pConstructor?.sourceSets.orEmpty().toSet() - ) { - annotationsInline(it) - text(it.name ?: "", styles = mainStyles.plus(TextStyle.Bold)) - text(": ") - signatureForProjection(it.type) - } + if (c is WithConstructors) { + val pConstructor = c.constructors.singleOrNull { it.extra[PrimaryConstructorExtra] != null } + if (pConstructor?.annotations()?.values?.any { it.isNotEmpty() } == true) { + text(nbsp.toString()) + annotationsInline(pConstructor) + text("constructor") + } + list( + pConstructor?.parameters.orEmpty(), + "(", + ")", + ",", + pConstructor?.sourceSets.orEmpty().toSet() + ) { + annotationsInline(it) + text(it.name ?: "", styles = mainStyles.plus(TextStyle.Bold)) + text(": ") + signatureForProjection(it.type) } } if (c is WithSupertypes) { diff --git a/plugins/base/src/main/resources/dokka/styles/style.css b/plugins/base/src/main/resources/dokka/styles/style.css index f180762b..d47d925f 100644 --- a/plugins/base/src/main/resources/dokka/styles/style.css +++ b/plugins/base/src/main/resources/dokka/styles/style.css @@ -233,6 +233,7 @@ display: flex; padding: 8px 8px 8px 16px; box-sizing: border-box; + white-space: pre-wrap; font-weight: bold; position: relative; line-height: 24px; -- cgit