aboutsummaryrefslogtreecommitdiff
path: root/test/src/TestAPI.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-20 14:08:30 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-20 14:08:30 +0100
commit85a3ae7626810113816fd31a0e26d44d48308ed2 (patch)
tree837eae154a30f139449f560d5e1afebf113041ee /test/src/TestAPI.kt
parentea1f4cc2987536c3ed3df5899e6cec2df890f1e6 (diff)
downloaddokka-85a3ae7626810113816fd31a0e26d44d48308ed2.tar.gz
dokka-85a3ae7626810113816fd31a0e26d44d48308ed2.tar.bz2
dokka-85a3ae7626810113816fd31a0e26d44d48308ed2.zip
support in-page anchors in locations
Diffstat (limited to 'test/src/TestAPI.kt')
-rw-r--r--test/src/TestAPI.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt
index 0b4c2084..285ffa28 100644
--- a/test/src/TestAPI.kt
+++ b/test/src/TestAPI.kt
@@ -100,7 +100,8 @@ fun ContentNode.toTestString(): String {
}
class InMemoryLocation(override val path: String): Location {
- override fun relativePathTo(other: Location): String = other.path
+ override fun relativePathTo(other: Location, anchor: String?): String =
+ if (anchor != null) other.path + "#" + anchor else other.path
}
object InMemoryLocationService: LocationService {