diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-01-14 20:21:49 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-01-14 20:21:49 +0100 |
commit | fac6872053a009dc083b2f0e487db0b94103d221 (patch) | |
tree | dca1005299c32a08102d6a99627fed8136f29f2b /src/main.kt | |
parent | 6146fa8b996a7d74f58ce1c926c114bc54bda0d1 (diff) | |
download | dokka-fac6872053a009dc083b2f0e487db0b94103d221.tar.gz dokka-fac6872053a009dc083b2f0e487db0b94103d221.tar.bz2 dokka-fac6872053a009dc083b2f0e487db0b94103d221.zip |
use .split(); fix TestAPI compilation
Diffstat (limited to 'src/main.kt')
-rw-r--r-- | src/main.kt | 4 |
1 files changed, 2 insertions, 2 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 }) } |