diff options
author | Vadim Mishenev <vad-mishenev@yandex.ru> | 2022-02-22 12:56:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 12:56:41 +0300 |
commit | b9b1b588fad604c0cfc3e481f48338437dcaba5f (patch) | |
tree | 7c6a04d95f0f9b0c931b25dca91f1cf411f01105 /plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt | |
parent | c44bf5487bd32f90a4576859548f1db0e9355a07 (diff) | |
download | dokka-b9b1b588fad604c0cfc3e481f48338437dcaba5f.tar.gz dokka-b9b1b588fad604c0cfc3e481f48338437dcaba5f.tar.bz2 dokka-b9b1b588fad604c0cfc3e481f48338437dcaba5f.zip |
Fix HTML head and favicon in multi-module projects (#2365)
Diffstat (limited to 'plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt')
-rw-r--r-- | plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt b/plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt index 8035fc83..02570849 100644 --- a/plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt +++ b/plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt @@ -12,10 +12,10 @@ class ReplaceVersionCommandHandler(private val context: DokkaContext) : CommandH override fun canHandle(command: Command): Boolean = command is ReplaceVersionsCommand - override fun handleCommand(element: Element, command: Command, input: File, output: File) { - val position = element.elementSiblingIndex() - val parent = element.parent() - element.remove() + override fun handleCommandAsTag(command: Command, body: Element, input: File, output: File) { + val position = body.elementSiblingIndex() + val parent = body.parent() + body.remove() context.configuration.moduleVersion?.takeIf { it.isNotEmpty() } ?.let { parent.insertChildren(position, TextNode(it)) } } |