aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--javadoc/src/main/kotlin/docbase.kt2
-rw-r--r--src/Java/JavaDocumentationBuilder.kt2
-rw-r--r--src/Kotlin/DocumentationBuilder.kt2
-rw-r--r--src/Model/Content.kt7
4 files changed, 8 insertions, 5 deletions
diff --git a/javadoc/src/main/kotlin/docbase.kt b/javadoc/src/main/kotlin/docbase.kt
index aa1e01a6..a513a3e1 100644
--- a/javadoc/src/main/kotlin/docbase.kt
+++ b/javadoc/src/main/kotlin/docbase.kt
@@ -57,7 +57,7 @@ open class DocumentationNodeAdapter(val module: ModuleNodeAdapter, docNode: Docu
override fun firstSentenceTags(): Array<out Tag> = buildInlineTags(module, this, docNode.summary).toTypedArray()
override fun tags(): Array<out Tag> = (buildInlineTags(module, this, docNode.content) + docNode.content.sections.flatMap {
when (it.tag) {
- "See Also" -> buildInlineTags(module, this, it)
+ ContentTags.SeeAlso -> buildInlineTags(module, this, it)
else -> emptyList<Tag>()
}
}).toTypedArray()
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()