aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src')
-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 9fe128dd..ca66c1a8 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt
@@ -6,7 +6,7 @@ import org.jetbrains.dokka.pages.ContentText
import org.jetbrains.dokka.pages.TextStyle
fun briefFromContentNodes(description: List<ContentNode>): List<ContentNode> {
- val firstSentenceRegex = Regex("^((?:[^.?!]|[.!?](?!\\s))*[.!?])")
+ val firstSentenceRegex = """^((?:[^.?!]|[.!?](?!\s))*[.!?])""".toRegex()
var sentenceFound = false
fun lookthrough(node: ContentNode): ContentNode =
@@ -23,4 +23,4 @@ fun briefFromContentNodes(description: List<ContentNode>): List<ContentNode> {
return description.mapNotNull {
if (!sentenceFound) lookthrough(it) else null
}
-} \ No newline at end of file
+}