diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-08-04 17:02:31 +0200 |
---|---|---|
committer | Marcin Aman <marcin.aman@gmail.com> | 2021-08-12 13:21:40 +0200 |
commit | 0fe8352ab057dfbbf690a723b2ccfc15b9977f4a (patch) | |
tree | 7017e7169950f907206832c862dce5e711e3cae8 /plugins/templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt | |
parent | 42c0320e0c5f2d79a5438558bb87d4668aa4c3cc (diff) | |
download | dokka-0fe8352ab057dfbbf690a723b2ccfc15b9977f4a.tar.gz dokka-0fe8352ab057dfbbf690a723b2ccfc15b9977f4a.tar.bz2 dokka-0fe8352ab057dfbbf690a723b2ccfc15b9977f4a.zip |
Webhelp-like frontend
Diffstat (limited to 'plugins/templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt')
-rw-r--r-- | plugins/templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt b/plugins/templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt new file mode 100644 index 00000000..8fc12b6c --- /dev/null +++ b/plugins/templating/src/main/kotlin/templates/ProjectNameSubstitutor.kt @@ -0,0 +1,13 @@ +package templates + +import org.jetbrains.dokka.base.templating.ProjectNameSubstitutionCommand +import org.jetbrains.dokka.base.templating.SubstitutionCommand +import org.jetbrains.dokka.plugability.DokkaContext +import org.jetbrains.dokka.templates.Substitutor +import org.jetbrains.dokka.templates.TemplatingContext + +class ProjectNameSubstitutor(private val dokkaContext: DokkaContext) : Substitutor { + + override fun trySubstitute(context: TemplatingContext<SubstitutionCommand>, match: MatchResult): String? = + dokkaContext.configuration.moduleName.takeIf { context.command is ProjectNameSubstitutionCommand } +}
\ No newline at end of file |