diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-10-14 18:03:59 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-10-14 18:03:59 +0400 |
commit | 3c30b2d120ac85bd814a2170ff4c852de88fc791 (patch) | |
tree | 7e4e9a1cde58424f4643a61d035c5aed0dd22f6c /src | |
parent | 280dc29f14d0aa66f4c799d15d478a6d9920841e (diff) | |
parent | b3d2b8c429ca840d7a1d09c83fa3e6426b0270cc (diff) | |
download | dokka-3c30b2d120ac85bd814a2170ff4c852de88fc791.tar.gz dokka-3c30b2d120ac85bd814a2170ff4c852de88fc791.tar.bz2 dokka-3c30b2d120ac85bd814a2170ff4c852de88fc791.zip |
Merge pull request #2 from kisenka/kotlin-website-formatter
Replace internal index pages URLs from "/index.html" with "/"
Diffstat (limited to 'src')
-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 ea54c97a..e694e222 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 { |