diff options
author | Xerus <27jf@web.de> | 2018-12-13 17:45:46 +0100 |
---|---|---|
committer | Xerus <27jf@web.de> | 2018-12-13 17:45:46 +0100 |
commit | ec2dfa898b4cf2613ca15cd959a43f4f590005d3 (patch) | |
tree | 05d830e360633b36d580ce2759c83070e3c51bed /core/src/main/kotlin/Samples | |
parent | 17dd9747828a2ba8275714dc421a415c68d01615 (diff) | |
download | dokka-ec2dfa898b4cf2613ca15cd959a43f4f590005d3.tar.gz dokka-ec2dfa898b4cf2613ca15cd959a43f4f590005d3.tar.bz2 dokka-ec2dfa898b4cf2613ca15cd959a43f4f590005d3.zip |
Fix IDEA Inspections
Diffstat (limited to 'core/src/main/kotlin/Samples')
-rw-r--r-- | core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt b/core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt index 116a5c02..ff11ca02 100644 --- a/core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt +++ b/core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt @@ -45,7 +45,7 @@ open class DefaultSampleProcessingService 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 finalText = lines.map { it.drop(indent) }.joinToString("\n") + val finalText = lines.joinToString("\n") { it.drop(indent) } return ContentBlockSampleCode(importsBlock = processImports(psiElement)).apply { append(ContentText(finalText)) } } @@ -81,9 +81,7 @@ open class DefaultSampleProcessingService for (part in parts) { // short name val symbolName = Name.identifier(part) - val partSymbol = currentScope.getContributedDescriptors(DescriptorKindFilter.ALL, { it == symbolName }) - .filter { it.name == symbolName } - .firstOrNull() + val partSymbol = currentScope.getContributedDescriptors(DescriptorKindFilter.ALL) { it == symbolName }.firstOrNull { it.name == symbolName } if (partSymbol == null) { symbol = null |