diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2020-07-06 10:08:43 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-07-07 13:23:26 +0200 |
commit | 9e8455d8a5285bfbdd92cab1515270f695a9b5d3 (patch) | |
tree | ccd79e5b5cdb533dbb62e8de63930b5a6adbb851 /core/src | |
parent | 2da1f3b1612fd19be8082283c6d070759a42de12 (diff) | |
download | dokka-9e8455d8a5285bfbdd92cab1515270f695a9b5d3.tar.gz dokka-9e8455d8a5285bfbdd92cab1515270f695a9b5d3.tar.bz2 dokka-9e8455d8a5285bfbdd92cab1515270f695a9b5d3.zip |
Make Location provider use anchor hints
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/kotlin/pages/ContentNodes.kt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt index 3843bb48..c8b767d3 100644 --- a/core/src/main/kotlin/pages/ContentNodes.kt +++ b/core/src/main/kotlin/pages/ContentNodes.kt @@ -2,6 +2,7 @@ package org.jetbrains.dokka.pages import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet import org.jetbrains.dokka.links.DRI +import org.jetbrains.dokka.model.WithChildren import org.jetbrains.dokka.model.properties.PropertyContainer import org.jetbrains.dokka.model.properties.WithExtraProperties @@ -9,12 +10,15 @@ data class DCI(val dri: Set<DRI>, val kind: Kind) { override fun toString() = "$dri[$kind]" } -interface ContentNode : WithExtraProperties<ContentNode> { +interface ContentNode : WithExtraProperties<ContentNode>, WithChildren<ContentNode> { val dci: DCI val sourceSets: Set<DokkaSourceSet> val style: Set<Style> fun hasAnyContent(): Boolean + + override val children: List<ContentNode> + get() = emptyList() } /** Simple text */ @@ -112,7 +116,7 @@ data class ContentEmbeddedResource( /** Logical grouping of [ContentNode]s */ interface ContentComposite : ContentNode { - val children: List<ContentNode> + override val children: List<ContentNode> // overwrite to make it abstract once again override fun hasAnyContent(): Boolean = children.any { it.hasAnyContent() } } |