aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers
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
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')
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt2
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt
index a8fabc95..f80cb6df 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt
@@ -159,6 +159,6 @@ internal class ReportUndocumentedTransformer : DocumentableTransformer {
val packageName = documentable.dri.packageName ?: return null
return dokkaSourceSet.perPackageOptions
.filter { packageOptions -> Regex(packageOptions.matchingRegex).matches(packageName) }
- .maxBy { packageOptions -> packageOptions.matchingRegex.length }
+ .maxByOrNull { packageOptions -> packageOptions.matchingRegex.length }
}
}
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) }
}