aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Java/JavaDocumentationBuilder.kt7
-rw-r--r--test/data/format/javaCodeInParam.java7
-rw-r--r--test/data/format/javaCodeInParam.md15
-rw-r--r--test/src/format/MarkdownFormatTest.kt6
4 files changed, 30 insertions, 5 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt
index c37e720b..1a28de47 100644
--- a/src/Java/JavaDocumentationBuilder.kt
+++ b/src/Java/JavaDocumentationBuilder.kt
@@ -38,11 +38,8 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions,
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()))
- }
- }
+ section.convertJavadocElements(
+ tag.getDataElements().filter { it !is PsiDocTagValue || tag.getSubjectName() == null })
}
}
}
diff --git a/test/data/format/javaCodeInParam.java b/test/data/format/javaCodeInParam.java
new file mode 100644
index 00000000..d1cdf6cd
--- /dev/null
+++ b/test/data/format/javaCodeInParam.java
@@ -0,0 +1,7 @@
+package test;
+
+/**
+ * @param T this is {@code some code} and other text
+ */
+class C<T> {
+}
diff --git a/test/data/format/javaCodeInParam.md b/test/data/format/javaCodeInParam.md
new file mode 100644
index 00000000..ef54eb6b
--- /dev/null
+++ b/test/data/format/javaCodeInParam.md
@@ -0,0 +1,15 @@
+[test](test/index) / [test](test/test/index) / [C](test/test/-c)
+
+
+# C
+
+`open class C&lt;T&gt; `
+
+
+
+
+### Parameters
+
+`T` - this is `some code` and other text
+
+
diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt
index 2ee4fa46..49d2ec1b 100644
--- a/test/src/format/MarkdownFormatTest.kt
+++ b/test/src/format/MarkdownFormatTest.kt
@@ -130,4 +130,10 @@ public class MarkdownFormatTest {
markdownService.appendNodes(tempLocation, output, model.members.single().members)
}
}
+
+ Test fun javaCodeInParam() {
+ verifyOutput("test/data/format/javaCodeInParam.java", ".md") { model, output ->
+ markdownService.appendNodes(tempLocation, output, model.members.single().members)
+ }
+ }
}