diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-05-17 19:48:44 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-05-17 19:48:44 +0300 |
commit | 9865da2e6e6c038ab6c719a6a03bb09184542d20 (patch) | |
tree | 986be16032df54f01ba47e3347937833dd761540 /core/src/main/kotlin/Locations | |
parent | ad95537c3f2eb5ba1478f82fd5b476d2309bc986 (diff) | |
download | dokka-9865da2e6e6c038ab6c719a6a03bb09184542d20.tar.gz dokka-9865da2e6e6c038ab6c719a6a03bb09184542d20.tar.bz2 dokka-9865da2e6e6c038ab6c719a6a03bb09184542d20.zip |
Fix incorrect link to stylesheet in html format
Diffstat (limited to 'core/src/main/kotlin/Locations')
-rw-r--r-- | core/src/main/kotlin/Locations/Location.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Locations/Location.kt b/core/src/main/kotlin/Locations/Location.kt index 0e6572d9..4cb0ac39 100644 --- a/core/src/main/kotlin/Locations/Location.kt +++ b/core/src/main/kotlin/Locations/Location.kt @@ -53,9 +53,9 @@ fun NodeLocationAwareGenerator.relativePathToLocation(owner: DocumentationNode, return location(owner).relativePathTo(location(node), null) } -fun NodeLocationAwareGenerator.relativeToRoot(from: Location): File { - val file = File(from.path) - return file.relativeTo(root) +fun NodeLocationAwareGenerator.relativePathToRoot(from: Location): File { + val file = File(from.path).parentFile + return root.relativeTo(file) } fun File.toUnixString() = toString().replace(File.separatorChar, '/') |