aboutsummaryrefslogtreecommitdiff
path: root/src/Locations/LocationService.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2015-12-03 12:13:17 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2015-12-03 12:13:17 +0100
commit797cb4732c53bf1e3b2091add8cf731fc436607f (patch)
tree5470caa451bdea99c371793bcc5411e179d1df71 /src/Locations/LocationService.kt
parent610ca01d0e2d6443f19b4218b26863cdacce07f1 (diff)
parent90cf2ebccd12073a55ff6f187e5a378a2e96e23b (diff)
downloaddokka-797cb4732c53bf1e3b2091add8cf731fc436607f.tar.gz
dokka-797cb4732c53bf1e3b2091add8cf731fc436607f.tar.bz2
dokka-797cb4732c53bf1e3b2091add8cf731fc436607f.zip
Merge pull request #38 from mikehearn/style-css
Enable browsing of the output HTML with CSS
Diffstat (limited to 'src/Locations/LocationService.kt')
-rw-r--r--src/Locations/LocationService.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Locations/LocationService.kt b/src/Locations/LocationService.kt
index 4f587361..80bc0236 100644
--- a/src/Locations/LocationService.kt
+++ b/src/Locations/LocationService.kt
@@ -27,7 +27,7 @@ public data class FileLocation(val file: File): Location {
return "."
}
val ownerFolder = file.parentFile!!
- val relativePath = ownerFolder.getRelativePath(other.file).path
+ val relativePath = ownerFolder.toPath().relativize(other.file.toPath()).toString()
return if (anchor == null) relativePath else relativePath + "#" + anchor
}
}
@@ -51,6 +51,8 @@ public interface LocationService {
* @param hasMembers if true, the node for which the location is calculated has member nodes.
*/
fun location(qualifiedName: List<String>, hasMembers: Boolean): Location
+
+ val root: Location
}