We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
../
1 parent f45e058 commit c38a214Copy full SHA for c38a214
buildSrc/src/main/kotlin/dokka-convention.gradle.kts
@@ -97,11 +97,15 @@ tasks.register("trimNavigationFiles") {
97
val navigation = moduleDir.resolve("navigation.html").toFile()
98
val doc = Jsoup.parse(navigation)
99
100
- // Remove a single parent directory from all navigation links
+ // Remove all parent directory elements from all navigation links
101
doc.select("a[href^=../]").forEach { anchor ->
102
- val originalHref = anchor.attr("href")
103
- val updatedHref = originalHref.removePrefix("../")
104
- anchor.attr("href", updatedHref)
+ var href = anchor.attr("href")
+
+ while (href.startsWith("../")) {
105
+ href = href.removePrefix("../")
106
+ }
107
108
+ anchor.attr("href", href)
109
}
110
111
// Trim side menus
0 commit comments