diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt index eada2e3b..4d44fdef 100644 --- a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt @@ -76,7 +76,11 @@ open class DefaultLocationProvider( .takeWhile { (a, b) -> a == b }.count() return (List(contextPath.size - commonPathElements) { ".." } + nodePath.drop(commonPathElements) + - if (node.children.isNotEmpty()) listOf(PAGE_WITH_CHILDREN_SUFFIX) else emptyList()).joinToString("/") + if (node is ClasslikePageNode || node.children.isNotEmpty()) + listOf(PAGE_WITH_CHILDREN_SUFFIX) + else + emptyList() + ).joinToString("/") } private fun PageNode.parent() = pageGraphRoot.parentMap[this] |