From 02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Thu, 31 Aug 2023 20:16:01 +0200 Subject: Enable explicit API mode (#3139) --- .../main/kotlin/resolvers/local/DokkaLocationProvider.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt') diff --git a/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt index e6508d0e..aedbfb88 100644 --- a/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt @@ -13,12 +13,12 @@ import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.plugability.DokkaContext import java.util.* -open class DokkaLocationProvider( +public open class DokkaLocationProvider( pageGraphRoot: RootPageNode, dokkaContext: DokkaContext, - val extension: String = ".html" + public val extension: String = ".html" ) : DokkaBaseLocationProvider(pageGraphRoot, dokkaContext) { - protected open val PAGE_WITH_CHILDREN_SUFFIX = "index" + protected open val PAGE_WITH_CHILDREN_SUFFIX: String = "index" protected open val pathsIndex: Map> = IdentityHashMap>().apply { fun registerPath(page: PageNode, prefix: List) { @@ -75,7 +75,7 @@ open class DokkaLocationProvider( } }.toMap() - override fun resolve(node: PageNode, context: PageNode?, skipExtension: Boolean) = + override fun resolve(node: PageNode, context: PageNode?, skipExtension: Boolean): String = pathTo(node, context) + if (!skipExtension) extension else "" override fun resolve(dri: DRI, sourceSets: Set, context: PageNode?): String? = @@ -158,13 +158,13 @@ open class DokkaLocationProvider( protected data class PageWithKind(val page: ContentPage, val kind: Kind) - companion object { - val reservedFilenames = setOf("index", "con", "aux", "lst", "prn", "nul", "eof", "inp", "out") + public companion object { + public val reservedFilenames: Set = setOf("index", "con", "aux", "lst", "prn", "nul", "eof", "inp", "out") //Taken from: https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names internal val reservedCharacters = setOf('|', '>', '<', '*', ':', '"', '?', '%') - fun identifierToFilename(name: String): String { + public fun identifierToFilename(name: String): String { if (name.isEmpty()) return "--root--" return sanitizeFileName(name, reservedFilenames, reservedCharacters) } -- cgit