From b6dce5370b0c90932127499a903453b199e69c5a Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 22 Jul 2021 14:27:55 +0200 Subject: Bump kotlin 1.5.21 (#2031) * bump kotlin to 1.5.21 * Bump binary compatibility plugin * update stdlib submodule * Bump IJ to 202.8194.7 --- .../transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/base/src/main/kotlin') diff --git a/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt index c099644f..5babc289 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt @@ -178,7 +178,7 @@ class KotlinWebsiteSamplesTransformer(context: DokkaContext): SamplesTransformer override fun processBody(psiElement: PsiElement): String { val text = processSampleBody(psiElement).trim { it == '\n' || it == '\r' }.trimEnd() val lines = text.split("\n") - val indent = lines.filter(String::isNotBlank).map { it.takeWhile(Char::isWhitespace).count() }.min() ?: 0 + val indent = lines.filter(String::isNotBlank).map { it.takeWhile(Char::isWhitespace).count() }.minOrNull() ?: 0 return lines.joinToString("\n") { it.drop(indent) } } -- cgit