aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/DocumentationBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-16 12:00:07 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-16 12:05:17 +0100
commitc11ae71c3fdad03f1ba0624ca693b34782f1e6e9 (patch)
tree0e1e8bf34e45fe2c332f05c766f4b15a194a2c87 /src/Kotlin/DocumentationBuilder.kt
parent902aeb158001473aa2d8d011c1e8e584163c5edd (diff)
downloaddokka-c11ae71c3fdad03f1ba0624ca693b34782f1e6e9.tar.gz
dokka-c11ae71c3fdad03f1ba0624ca693b34782f1e6e9.tar.bz2
dokka-c11ae71c3fdad03f1ba0624ca693b34782f1e6e9.zip
convert doc tags to sections
Diffstat (limited to 'src/Kotlin/DocumentationBuilder.kt')
-rw-r--r--src/Kotlin/DocumentationBuilder.kt9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt
index 1ad1e9e8..775c959a 100644
--- a/src/Kotlin/DocumentationBuilder.kt
+++ b/src/Kotlin/DocumentationBuilder.kt
@@ -61,7 +61,7 @@ class DocumentationBuilder(val session: ResolveSession, val options: Documentati
"see" ->
content.addTagToSeeAlso(it)
else -> {
- val section = content.addSection(displayName(it.getName()), it.getSubjectName())
+ val section = content.addSection(javadocSectionDisplayName(it.getName()), it.getSubjectName())
val sectionContent = it.getContent()
val markdownNode = parseMarkdown(sectionContent)
buildInlineContentTo(markdownNode, section)
@@ -74,13 +74,6 @@ class DocumentationBuilder(val session: ResolveSession, val options: Documentati
fun KDocSection.getTags(): Array<KDocTag> = PsiTreeUtil.getChildrenOfType(this, javaClass<KDocTag>()) ?: array()
- fun displayName(sectionName: String?): String? =
- when(sectionName) {
- "param" -> "Parameters"
- "throws", "exception" -> "Exceptions"
- else -> sectionName?.capitalize()
- }
-
private fun Content.addTagToSeeAlso(seeTag: KDocTag) {
val subjectName = seeTag.getSubjectName()
if (subjectName != null) {