From b9b1b588fad604c0cfc3e481f48338437dcaba5f Mon Sep 17 00:00:00 2001 From: Vadim Mishenev Date: Tue, 22 Feb 2022 12:56:41 +0300 Subject: Fix HTML head and favicon in multi-module projects (#2365) --- .../src/main/kotlin/templates/ReplaceVersionCommandHandler.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/templating/src/main/kotlin/templates/ReplaceVersionCommandHandler.kt') 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)) } } -- cgit