diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-08-31 20:16:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-31 20:16:01 +0200 |
commit | 02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch) | |
tree | 66f6d6f089a93b863bf1144666491eca6729ad05 /plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt | |
parent | 6a181a7a2b03ec263788d137610e86937a57d434 (diff) | |
download | dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2 dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip |
Enable explicit API mode (#3139)
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt b/plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt index 1754ea32..b6ce4147 100644 --- a/plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt +++ b/plugins/base/src/main/kotlin/renderers/html/htmlFormatingUtils.kt @@ -7,7 +7,7 @@ package org.jetbrains.dokka.base.renderers.html import kotlinx.html.FlowContent import kotlinx.html.span -fun FlowContent.buildTextBreakableAfterCapitalLetters(name: String, hasLastElement: Boolean = false) { +public fun FlowContent.buildTextBreakableAfterCapitalLetters(name: String, hasLastElement: Boolean = false) { if (name.contains(" ")) { val withOutSpaces = name.split(" ") withOutSpaces.dropLast(1).forEach { @@ -23,7 +23,7 @@ fun FlowContent.buildTextBreakableAfterCapitalLetters(name: String, hasLastEleme } } -fun FlowContent.buildBreakableDotSeparatedHtml(name: String) { +public fun FlowContent.buildBreakableDotSeparatedHtml(name: String) { val phrases = name.split(".") phrases.forEachIndexed { i, e -> val elementWithOptionalDot = e.takeIf { i == phrases.lastIndex } ?: "$e." @@ -61,6 +61,7 @@ private fun FlowContent.buildBreakableHtmlElement(element: String, last: Boolean } } -fun FlowContent.buildBreakableText(name: String) = +public fun FlowContent.buildBreakableText(name: String) { if (name.contains(".")) buildBreakableDotSeparatedHtml(name) else buildTextBreakableAfterCapitalLetters(name, hasLastElement = true) +} |