diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-10-03 21:29:56 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-10-03 21:29:56 +0400 |
commit | e93440bd4a520ab81203e8b0105ac43323f67e6b (patch) | |
tree | 1217f90bff6c4cd3a30a811b930ffad11e0d7a0f /src/Locations/LocationService.kt | |
parent | aedccb96b16c18e0d3a73f36c28ebf5fc0086e1c (diff) | |
download | dokka-e93440bd4a520ab81203e8b0105ac43323f67e6b.tar.gz dokka-e93440bd4a520ab81203e8b0105ac43323f67e6b.tar.bz2 dokka-e93440bd4a520ab81203e8b0105ac43323f67e6b.zip |
Constructors, variance, links and styles.
Diffstat (limited to 'src/Locations/LocationService.kt')
-rw-r--r-- | src/Locations/LocationService.kt | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Locations/LocationService.kt b/src/Locations/LocationService.kt index 277169fd..f89fedd0 100644 --- a/src/Locations/LocationService.kt +++ b/src/Locations/LocationService.kt @@ -14,14 +14,12 @@ public trait LocationService { public fun escapeUri(path: String): String = path.replace('<', '_').replace('>', '_') -fun LocationService.relativeLocation(node: DocumentationNode, link: DocumentationNode, extension: String): Location { - val ownerFolder = location(node).file.getParentFile()!! - val memberPath = location(link).file.appendExtension(extension) - return Location(ownerFolder.getRelativePath(memberPath)) +fun LocationService.relativeLocation(owner: DocumentationNode, node: DocumentationNode, extension: String): Location { + return relativeLocation(location(owner), node, extension) } -fun LocationService.relativeLocation(location: Location, link: DocumentationNode, extension: String): Location { - val ownerFolder = location.file.getParentFile()!! - val memberPath = location(link).file.appendExtension(extension) +fun LocationService.relativeLocation(owner: Location, node: DocumentationNode, extension: String): Location { + val ownerFolder = owner.file.getParentFile()!! + val memberPath = location(node).file.appendExtension(extension) return Location(ownerFolder.getRelativePath(memberPath)) } |