diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Java/JavaDocumentationBuilder.kt | 2 | ||||
-rw-r--r-- | src/Kotlin/DocumentationBuilder.kt | 2 | ||||
-rw-r--r-- | src/Model/Content.kt | 7 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt index fdd385fb..aae82c18 100644 --- a/src/Java/JavaDocumentationBuilder.kt +++ b/src/Java/JavaDocumentationBuilder.kt @@ -112,7 +112,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, if (linkElement == null) { return } - val seeSection = findSectionByTag("See Also") ?: addSection("See Also", null) + val seeSection = findSectionByTag(ContentTags.SeeAlso) ?: addSection(ContentTags.SeeAlso, null) val linkSignature = resolveLink(linkElement) val text = ContentText(linkElement.getText()) if (linkSignature != null) { diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt index eda69841..8e36ae43 100644 --- a/src/Kotlin/DocumentationBuilder.kt +++ b/src/Kotlin/DocumentationBuilder.kt @@ -210,7 +210,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, private fun MutableContent.addTagToSeeAlso(descriptor: DeclarationDescriptor, seeTag: KDocTag) { val subjectName = seeTag.getSubjectName() if (subjectName != null) { - val seeSection = findSectionByTag("See Also") ?: addSection("See Also", null) + val seeSection = findSectionByTag(ContentTags.SeeAlso) ?: addSection(ContentTags.SeeAlso, null) val link = resolveContentLink(descriptor, subjectName) link.append(ContentText(subjectName)) val para = ContentParagraph() diff --git a/src/Model/Content.kt b/src/Model/Content.kt index 032de268..cd387b61 100644 --- a/src/Model/Content.kt +++ b/src/Model/Content.kt @@ -1,7 +1,5 @@ package org.jetbrains.dokka -import kotlin.properties.Delegates - public abstract class ContentNode public object ContentEmpty : ContentNode() @@ -87,6 +85,11 @@ public class ContentSection(public val tag: String, public val subjectName: Stri children.hashCode() * 31 * 31 + tag.hashCode() * 31 + (subjectName?.hashCode() ?: 0) } +public object ContentTags { + val Description = "Description" + val SeeAlso = "See Also" +} + fun content(body: ContentBlock.() -> Unit): ContentBlock { val block = ContentBlock() block.body() |