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.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Locations/LocationService.kt b/src/Locations/LocationService.kt
index 6472e906..277169fd 100644
--- a/src/Locations/LocationService.kt
+++ b/src/Locations/LocationService.kt
@@ -19,3 +19,9 @@ fun LocationService.relativeLocation(node: DocumentationNode, link: Documentatio
val memberPath = location(link).file.appendExtension(extension)
return Location(ownerFolder.getRelativePath(memberPath))
}
+
+fun LocationService.relativeLocation(location: Location, link: DocumentationNode, extension: String): Location {
+ val ownerFolder = location.file.getParentFile()!!
+ val memberPath = location(link).file.appendExtension(extension)
+ return Location(ownerFolder.getRelativePath(memberPath))
+}