aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-16 12:10:50 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-16 12:10:50 +0100
commit77effb4fa1e9263c30ef3594934e91d51df6bae3 (patch)
treec0d71358d504d881a6f53604cec182b9d48ef5f1 /src/Java
parentc11ae71c3fdad03f1ba0624ca693b34782f1e6e9 (diff)
downloaddokka-77effb4fa1e9263c30ef3594934e91d51df6bae3.tar.gz
dokka-77effb4fa1e9263c30ef3594934e91d51df6bae3.tar.bz2
dokka-77effb4fa1e9263c30ef3594934e91d51df6bae3.zip
don't lose tag value where it's actually part of the description
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/JavaDocumentationBuilder.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt
index 660ffafb..c76c4c33 100644
--- a/src/Java/JavaDocumentationBuilder.kt
+++ b/src/Java/JavaDocumentationBuilder.kt
@@ -31,11 +31,11 @@ public class JavaDocumentationBuilder() {
val text = if (result.isEmpty()) it.getText().trimLeading() else it.getText()
result.append(ContentText(text))
}
- docComment.getTags().forEach {
- val subjectName = it.getSubjectName()
- val section = result.addSection(javadocSectionDisplayName(it.getName()), subjectName)
- it.getDataElements().forEach {
- if (it !is PsiDocTagValue) {
+ docComment.getTags().forEach { tag ->
+ val subjectName = tag.getSubjectName()
+ val section = result.addSection(javadocSectionDisplayName(tag.getName()), subjectName)
+ tag.getDataElements().forEach {
+ if (it !is PsiDocTagValue || tag.getSubjectName() == null) {
section.append(ContentText(it.getText()))
}
}
@@ -44,7 +44,7 @@ public class JavaDocumentationBuilder() {
}
fun PsiDocTag.getSubjectName(): String? {
- if (getName() == "param") {
+ if (getName() == "param" || getName() == "throws" || getName() == "exception") {
return getValueElement()?.getText()
}
return null