diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-06-22 11:18:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 11:18:20 +0200 |
commit | 8d6536d3a3d0dcd80a2e6b77b047524e15533f0b (patch) | |
tree | 202f9db5dc3231899c992671fc89a9a56b63db49 /plugins/base/src/main/kotlin/transformers | |
parent | 2832b9a111ba3af0212cbc180e8b1535b8359a15 (diff) | |
download | dokka-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.kt | 2 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt | 2 |
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) } } |