aboutsummaryrefslogtreecommitdiff
path: root/src/Java/JavaDocumentationBuilder.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/JavaDocumentationBuilder.kt')
-rw-r--r--src/Java/JavaDocumentationBuilder.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt
index 8a5d8fb9..055d64d3 100644
--- a/src/Java/JavaDocumentationBuilder.kt
+++ b/src/Java/JavaDocumentationBuilder.kt
@@ -128,6 +128,12 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions,
valueElement!!.getText()
}
}
+ "code", "literal" -> {
+ val text = StringBuilder()
+ tag.getDataElements().forEach { text.append(it.getText()) }
+ val escaped = text.toString().trimLeading().htmlEscape()
+ if (tag.getName() == "code") "<code>$escaped</code>" else escaped
+ }
else -> tag.getText()
}