From 9849287541fc23ef130729bd5e1e908a47b97ac3 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 26 Feb 2015 12:46:04 +0100 Subject: use correct extension in links for jekyll and kotlin-website docs --- src/Locations/FoldersLocationService.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Locations') diff --git a/src/Locations/FoldersLocationService.kt b/src/Locations/FoldersLocationService.kt index ce202cfe..2e9a9cd5 100644 --- a/src/Locations/FoldersLocationService.kt +++ b/src/Locations/FoldersLocationService.kt @@ -4,7 +4,9 @@ import java.io.File public fun FoldersLocationService(root: String): FoldersLocationService = FoldersLocationService(File(root), "") public class FoldersLocationService(val root: File, val extension: String) : FileLocationService { - override fun withExtension(newExtension: String): LocationService = FoldersLocationService(root, newExtension) + override fun withExtension(newExtension: String): LocationService { + return if (extension.isEmpty()) FoldersLocationService(root, newExtension) else this + } override fun location(qualifiedName: List, hasMembers: Boolean): FileLocation { return FileLocation(File(root, relativePathToNode(qualifiedName, hasMembers)).appendExtension(extension)) -- cgit