aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.kt4
-rw-r--r--test/src/TestAPI.kt2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main.kt b/src/main.kt
index abe8eda9..989e8a36 100644
--- a/src/main.kt
+++ b/src/main.kt
@@ -46,8 +46,8 @@ class DokkaArguments {
class SourceLinkDefinition(val path: String, val url: String, val lineSuffix: String?)
private fun parseSourceLinkDefinition(srcLink: String): SourceLinkDefinition {
- val urlAndLine = srcLink.substringAfter("=")
- return SourceLinkDefinition(File(srcLink.substringBefore("=")).getAbsolutePath(),
+ val (path, urlAndLine) = srcLink.split('=')
+ return SourceLinkDefinition(File(path).getAbsolutePath(),
urlAndLine.substringBefore("#"),
urlAndLine.substringAfter("#", "").let { if (it.isEmpty()) null else "#" + it })
}
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt
index 4d64014e..f3c5f8c8 100644
--- a/test/src/TestAPI.kt
+++ b/test/src/TestAPI.kt
@@ -32,7 +32,7 @@ public fun verifyModel(vararg files: String, verifier: (DocumentationModule) ->
addSources(files.toList())
}
- val options = DocumentationOptions(includeNonPublic = true)
+ val options = DocumentationOptions(includeNonPublic = true, sourceLinks = listOf<SourceLinkDefinition>())
val documentation = environment.withContext { environment, session ->
val fragments = environment.getSourceFiles().map { session.getPackageFragment(it.getPackageFqName()) }.filterNotNull().distinct()