aboutsummaryrefslogtreecommitdiff
path: root/src/Locations/LocationService.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-10-03 21:29:56 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-10-03 21:29:56 +0400
commite93440bd4a520ab81203e8b0105ac43323f67e6b (patch)
tree1217f90bff6c4cd3a30a811b930ffad11e0d7a0f /src/Locations/LocationService.kt
parentaedccb96b16c18e0d3a73f36c28ebf5fc0086e1c (diff)
downloaddokka-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.kt12
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))
}