aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-05-05 01:54:31 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-07-14 23:57:12 +0300
commit6361dd32aaf567c8e03e4aa63006193dc67cca7b (patch)
tree39ebb954038b5697129b360badee8e9a679b4253 /core/src/main
parent3c6be4a1dbbcfec5e5438452f54857cce86d0d17 (diff)
downloaddokka-6361dd32aaf567c8e03e4aa63006193dc67cca7b.tar.gz
dokka-6361dd32aaf567c8e03e4aa63006193dc67cca7b.tar.bz2
dokka-6361dd32aaf567c8e03e4aa63006193dc67cca7b.zip
Fix relative uri's generation
when there is matching trailing segments
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/Utilities/Uri.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Utilities/Uri.kt b/core/src/main/kotlin/Utilities/Uri.kt
index 5b520188..9827c624 100644
--- a/core/src/main/kotlin/Utilities/Uri.kt
+++ b/core/src/main/kotlin/Utilities/Uri.kt
@@ -19,7 +19,7 @@ fun URI.relativeTo(uri: URI): URI {
}
// Compute common prefix
- val commonPartsSize = bParts.zip(cParts).count { (basePart, childPart) -> basePart == childPart }
+ val commonPartsSize = bParts.zip(cParts).takeWhile { (basePart, childPart) -> basePart == childPart }.count()
bParts.drop(commonPartsSize).joinTo(this, separator = "") { "../" }
cParts.drop(commonPartsSize).joinTo(this, separator = "/")
}