diff options
-rw-r--r-- | src/Formats/KotlinWebsiteFormatService.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Formats/KotlinWebsiteFormatService.kt b/src/Formats/KotlinWebsiteFormatService.kt index 9fee14ff..8170b5a9 100644 --- a/src/Formats/KotlinWebsiteFormatService.kt +++ b/src/Formats/KotlinWebsiteFormatService.kt @@ -18,9 +18,11 @@ public class KotlinWebsiteFormatService(locationService: LocationService, } override fun formatLink(text: String, location: Location): String { - return "<a href=\"${location.path - .replace("\\", "/") - .replaceAfterLast(".","html")}\">${text}</a>" + val href = location.path.replace("\\", "/") + .replaceAfterLast(".", "html") + .replace("/index.html", "/"); + + return "<a href=\"${href}\">${text}</a>" } override fun formatLink(text: String, href: String): String { |