aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-08-31 20:16:01 +0200
committerGitHub <noreply@github.com>2023-08-31 20:16:01 +0200
commit02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch)
tree66f6d6f089a93b863bf1144666491eca6729ad05 /plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt
parent6a181a7a2b03ec263788d137610e86937a57d434 (diff)
downloaddokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip
Enable explicit API mode (#3139)
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt')
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt b/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt
index c5b1f738..a073f73a 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt
@@ -12,7 +12,7 @@ import org.jetbrains.dokka.model.doc.Text
import org.jetbrains.dokka.model.withDescendants
import org.jetbrains.dokka.pages.*
-fun firstParagraphBrief(docTag: DocTag): DocTag? =
+public fun firstParagraphBrief(docTag: DocTag): DocTag? =
when(docTag){
is P -> docTag
is CustomDocTag -> docTag.children.firstNotNullOfOrNull { firstParagraphBrief(it) }
@@ -20,7 +20,7 @@ fun firstParagraphBrief(docTag: DocTag): DocTag? =
else -> null
}
-fun firstSentenceBriefFromContentNodes(description: List<ContentNode>): List<ContentNode> {
+public fun firstSentenceBriefFromContentNodes(description: List<ContentNode>): List<ContentNode> {
val firstSentenceRegex = """^((?:[^.?!]|[.!?](?!\s))*[.!?])""".toRegex()
//Description that is entirely based on html content. In html it is hard to define a brief so we render all of it