diff options
Diffstat (limited to 'plugins/templating/src/main/kotlin/templates/PathToRootSubstitutor.kt')
-rw-r--r-- | plugins/templating/src/main/kotlin/templates/PathToRootSubstitutor.kt | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/plugins/templating/src/main/kotlin/templates/PathToRootSubstitutor.kt b/plugins/templating/src/main/kotlin/templates/PathToRootSubstitutor.kt deleted file mode 100644 index 2ba290cf..00000000 --- a/plugins/templating/src/main/kotlin/templates/PathToRootSubstitutor.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.templates - -import org.jetbrains.dokka.base.templating.PathToRootSubstitutionCommand -import org.jetbrains.dokka.base.templating.SubstitutionCommand -import org.jetbrains.dokka.plugability.DokkaContext -import java.io.File - -public class PathToRootSubstitutor( - private val dokkaContext: DokkaContext -) : Substitutor { - - override fun trySubstitute(context: TemplatingContext<SubstitutionCommand>, match: MatchResult): String? = - if (context.command is PathToRootSubstitutionCommand) { - context.output.toPath().parent.relativize(dokkaContext.configuration.outputDir.toPath()).toString().split(File.separator).joinToString(separator = "/", postfix = "/") { it } - } else null -} |