aboutsummaryrefslogtreecommitdiff
path: root/plugins/all-modules-page/src
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2022-02-22 12:56:41 +0300
committerGitHub <noreply@github.com>2022-02-22 12:56:41 +0300
commitb9b1b588fad604c0cfc3e481f48338437dcaba5f (patch)
tree7c6a04d95f0f9b0c931b25dca91f1cf411f01105 /plugins/all-modules-page/src
parentc44bf5487bd32f90a4576859548f1db0e9355a07 (diff)
downloaddokka-b9b1b588fad604c0cfc3e481f48338437dcaba5f.tar.gz
dokka-b9b1b588fad604c0cfc3e481f48338437dcaba5f.tar.bz2
dokka-b9b1b588fad604c0cfc3e481f48338437dcaba5f.zip
Fix HTML head and favicon in multi-module projects (#2365)
Diffstat (limited to 'plugins/all-modules-page/src')
-rw-r--r--plugins/all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt b/plugins/all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt
index e881a5ab..7976ba5a 100644
--- a/plugins/all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt
+++ b/plugins/all-modules-page/src/main/kotlin/ResolveLinkCommandHandler.kt
@@ -16,29 +16,29 @@ class ResolveLinkCommandHandler(context: DokkaContext) : CommandHandler {
private val externalModuleLinkResolver =
context.plugin<AllModulesPagePlugin>().querySingle { externalModuleLinkResolver }
- override fun handleCommand(element: Element, command: Command, input: File, output: File) {
+ override fun handleCommandAsTag(command: Command, body: Element, input: File, output: File) {
command as ResolveLinkCommand
val link = externalModuleLinkResolver.resolve(command.dri, output)
if (link == null) {
- val children = element.childNodes().toList()
+ val children = body.childNodes().toList()
val attributes = Attributes().apply {
put("data-unresolved-link", command.dri.toString())
}
val el = Element(Tag.valueOf("span"), "", attributes).apply {
children.forEach { ch -> appendChild(ch) }
}
- element.replaceWith(el)
+ body.replaceWith(el)
return
}
val attributes = Attributes().apply {
put("href", link)
}
- val children = element.childNodes().toList()
+ val children = body.childNodes().toList()
val el = Element(Tag.valueOf("a"), "", attributes).apply {
children.forEach { ch -> appendChild(ch) }
}
- element.replaceWith(el)
+ body.replaceWith(el)
}
override fun canHandle(command: Command): Boolean = command is ResolveLinkCommand