aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers/pages/samples
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-06-22 11:18:20 +0200
committerGitHub <noreply@github.com>2021-06-22 11:18:20 +0200
commit8d6536d3a3d0dcd80a2e6b77b047524e15533f0b (patch)
tree202f9db5dc3231899c992671fc89a9a56b63db49 /plugins/base/src/main/kotlin/transformers/pages/samples
parent2832b9a111ba3af0212cbc180e8b1535b8359a15 (diff)
downloaddokka-8d6536d3a3d0dcd80a2e6b77b047524e15533f0b.tar.gz
dokka-8d6536d3a3d0dcd80a2e6b77b047524e15533f0b.tar.bz2
dokka-8d6536d3a3d0dcd80a2e6b77b047524e15533f0b.zip
Multilanguage docs inheritance (#1951)
* Multilanguage docs inheritance * Add map to store inherit doc entries
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/pages/samples')
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt2
1 files changed, 1 insertions, 1 deletions
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) }
}