diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2020-10-07 19:36:49 +0200 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-27 03:15:02 +0100 |
commit | d41965ca3cb180bc82bd5dd6fa747d2b83381b31 (patch) | |
tree | 5660f17f21fdf5871c8239f4d96c4521545292d1 /core/src/main/kotlin/pages/PageNodes.kt | |
parent | dc179bf9a649d925e7e64dbcaf52a2187416a1d5 (diff) | |
download | dokka-d41965ca3cb180bc82bd5dd6fa747d2b83381b31.tar.gz dokka-d41965ca3cb180bc82bd5dd6fa747d2b83381b31.tar.bz2 dokka-d41965ca3cb180bc82bd5dd6fa747d2b83381b31.zip |
Implement immediate temaplates resolution
Diffstat (limited to 'core/src/main/kotlin/pages/PageNodes.kt')
-rw-r--r-- | core/src/main/kotlin/pages/PageNodes.kt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/main/kotlin/pages/PageNodes.kt b/core/src/main/kotlin/pages/PageNodes.kt index a91887b4..94ec8258 100644 --- a/core/src/main/kotlin/pages/PageNodes.kt +++ b/core/src/main/kotlin/pages/PageNodes.kt @@ -30,7 +30,7 @@ interface ContentPage : PageNode { ): ContentPage } -abstract class RootPageNode : PageNode { +abstract class RootPageNode(val forceTopLevelName: Boolean = false) : PageNode { val parentMap: Map<PageNode, PageNode> by lazy { IdentityHashMap<PageNode, PageNode>().apply { fun process(parent: PageNode) { @@ -157,18 +157,18 @@ class MemberPageNode( class MultimoduleRootPageNode( - override val name: String, override val dri: Set<DRI>, override val content: ContentNode, override val embeddedResources: List<String> = emptyList() -) : RootPageNode(), MultimoduleRootPage { +) : RootPageNode(forceTopLevelName = true), MultimoduleRootPage { + override val name = "" override val children: List<PageNode> = emptyList() override val documentable: Documentable? = null override fun modified(name: String, children: List<PageNode>): RootPageNode = - MultimoduleRootPageNode(name, dri, content, embeddedResources) + MultimoduleRootPageNode(dri, content, embeddedResources) override fun modified( name: String, @@ -178,7 +178,7 @@ class MultimoduleRootPageNode( children: List<PageNode> ) = if (name == this.name && content === this.content && embeddedResources === this.embeddedResources && children shallowEq this.children) this - else MultimoduleRootPageNode(name, dri, content, embeddedResources) + else MultimoduleRootPageNode(dri, content, embeddedResources) } inline fun <reified T : PageNode> PageNode.children() = children.filterIsInstance<T>() |