aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt8
-rw-r--r--plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt2
2 files changed, 2 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt b/plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt
index 19079241..d77426da 100644
--- a/plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt
@@ -22,13 +22,7 @@ fun FlowContent.buildTextBreakableAfterCapitalLetters(name: String, hasLastEleme
fun FlowContent.buildBreakableDotSeparatedHtml(name: String) {
val phrases = name.split(".")
phrases.forEachIndexed { i, e ->
- val elementWithOptionalDot =
- if (i != phrases.lastIndex) {
- "$e."
- } else {
- e
- }
-
+ val elementWithOptionalDot = e.takeIf { i == phrases.lastIndex } ?: "$e."
if (e.length > 10) {
buildTextBreakableAfterCapitalLetters(elementWithOptionalDot, hasLastElement = i == phrases.lastIndex)
} else {
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
index a3770ca2..bd967518 100644
--- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
+++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
@@ -176,7 +176,7 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
pConstructor.sourceSets.toSet()
) {
annotationsInline(it)
- text(it.name ?: "")
+ text(it.name.orEmpty())
text(": ")
signatureForProjection(it.type)
}