aboutsummaryrefslogtreecommitdiff
path: root/src/Locations/LocationService.kt
diff options
context:
space:
mode:
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))
}