aboutsummaryrefslogtreecommitdiff
path: root/src/Model/DocumentationNode.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/DocumentationNode.kt')
-rw-r--r--src/Model/DocumentationNode.kt12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Model/DocumentationNode.kt b/src/Model/DocumentationNode.kt
index 18efaa9b..2be5bf15 100644
--- a/src/Model/DocumentationNode.kt
+++ b/src/Model/DocumentationNode.kt
@@ -3,11 +3,21 @@ package org.jetbrains.dokka
import java.util.LinkedHashSet
public open class DocumentationNode(val name: String,
- val doc: Content,
+ val content: Content,
val kind: DocumentationNode.Kind) {
private val references = LinkedHashSet<DocumentationReference>()
+ public val summary: ContentNode get() {
+ val contentSection = content.sections["\$summary"]
+ if (contentSection != null)
+ return contentSection
+ val ownerSection = owner?.content?.sections?.get(name)
+ if (ownerSection != null)
+ return ownerSection
+ return ContentNode.empty
+ }
+
public val owner: DocumentationNode?
get() = references(DocumentationReference.Kind.Owner).singleOrNull()?.to
public val details: List<DocumentationNode>