From 8d6536d3a3d0dcd80a2e6b77b047524e15533f0b Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Tue, 22 Jun 2021 11:18:20 +0200 Subject: Multilanguage docs inheritance (#1951) * Multilanguage docs inheritance * Add map to store inherit doc entries --- .../main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/base/src/main/kotlin/transformers/pages/samples') diff --git a/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt index a391b534..cadd3de0 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt @@ -13,7 +13,7 @@ class DefaultSamplesTransformer(context: DokkaContext) : SamplesTransformer(cont 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