diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2020-05-22 14:08:08 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-05-25 10:11:47 +0200 |
commit | c8dba800d9f3be90e073bf9de9d48ab9da9c85e7 (patch) | |
tree | 53bb371590a06c94a177531789473aefd350d08d | |
parent | 5937d33ca13773d66c7451b6dde16b276189f6d1 (diff) | |
download | dokka-c8dba800d9f3be90e073bf9de9d48ab9da9c85e7.tar.gz dokka-c8dba800d9f3be90e073bf9de9d48ab9da9c85e7.tar.bz2 dokka-c8dba800d9f3be90e073bf9de9d48ab9da9c85e7.zip |
Trim windows carrage return sign in importing includes
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt | 2 | ||||
-rw-r--r-- | plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt index a886494e..b1f50a32 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt @@ -41,7 +41,7 @@ internal class ModuleAndPackageDocumentationTransformer(val context: DokkaContex } // Matches space between Module/Package and fully qualified name }.groupBy({ it[0] }, { it[1].split(Regex("\n"), 2) // Matches new line after fully qualified name - .let { it[0] to it[1].trim() } + .let { it[0].trim() to it[1].trim() } }).mapValues { it.value.toMap() } diff --git a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt index b18c3a5a..c34fa909 100644 --- a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt +++ b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.safeAs import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test +import java.nio.file.Paths class LinkableContentTest : AbstractCoreTest() { @@ -29,20 +30,20 @@ class LinkableContentTest : AbstractCoreTest() { analysisPlatform = "js" targets = listOf("js") sourceRoots = listOf("jsMain", "commonMain", "jvmAndJsSecondCommonMain").map { - "$testDataDir/$it/kotlin" + Paths.get("$testDataDir/$it/kotlin").toString() } sourceSetName = "js" - includes = listOf("$includesDir/include2.md") + includes = listOf(Paths.get("$includesDir/include2.md").toString()) } pass { moduleName = "example" analysisPlatform = "jvm" targets = listOf("jvm") sourceRoots = listOf("jvmMain", "commonMain", "jvmAndJsSecondCommonMain").map { - "$testDataDir/$it/kotlin" + Paths.get("$testDataDir/$it/kotlin").toString() } sourceSetName = "jvm" - includes = listOf("$includesDir/include1.md") + includes = listOf(Paths.get("$includesDir/include1.md").toString()) } } } |