diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Java/JavaDocumentationBuilder.kt | 6 | ||||
-rw-r--r-- | src/Utilities/Html.kt | 1 |
2 files changed, 6 insertions, 1 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() } diff --git a/src/Utilities/Html.kt b/src/Utilities/Html.kt index 9630c8cb..ce3a1982 100644 --- a/src/Utilities/Html.kt +++ b/src/Utilities/Html.kt @@ -6,4 +6,3 @@ package org.jetbrains.dokka * Replaces & with &, < with < and > with > */ public fun String.htmlEscape(): String = replace("&", "&").replace("<", "<").replace(">", ">") - |