diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-27 16:58:27 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-27 16:58:27 +0100 |
commit | 8a65a7ab62e4567bbb20cececcad88eb9ac396d9 (patch) | |
tree | 25c75ef3988f4d757cd76a2bc1e48cf38499d430 /src/Java | |
parent | a9538f2f49e15b04340215d8d670557ced6f132d (diff) | |
download | dokka-8a65a7ab62e4567bbb20cececcad88eb9ac396d9.tar.gz dokka-8a65a7ab62e4567bbb20cececcad88eb9ac396d9.tar.bz2 dokka-8a65a7ab62e4567bbb20cececcad88eb9ac396d9.zip |
handle @code and @literal tags in javadoc
Diffstat (limited to 'src/Java')
-rw-r--r-- | src/Java/JavaDocumentationBuilder.kt | 6 |
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() } |