From d6fd04521ba4c4c430286078dd56309111c180e6 Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Fri, 3 Oct 2014 20:20:02 +0400 Subject: Cross-reference links on types, relative locations. --- src/Locations/LocationService.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Locations') 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)) +} -- cgit