diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-03 19:51:43 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-03 19:51:43 +0100 |
commit | f3973480c0b03c9f28f05b5a4cf61bf3de3597bd (patch) | |
tree | 54fd4c5b7d30d2daf969c216936663335d1634fd /src/Java | |
parent | 6659337410225b813ea902bfa4b2e5ba3c2c1aaa (diff) | |
download | dokka-f3973480c0b03c9f28f05b5a4cf61bf3de3597bd.tar.gz dokka-f3973480c0b03c9f28f05b5a4cf61bf3de3597bd.tar.bz2 dokka-f3973480c0b03c9f28f05b5a4cf61bf3de3597bd.zip |
support links with custom labels
Diffstat (limited to 'src/Java')
-rw-r--r-- | src/Java/JavaDocumentationBuilder.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt index c2a15a45..00a7f3ac 100644 --- a/src/Java/JavaDocumentationBuilder.kt +++ b/src/Java/JavaDocumentationBuilder.kt @@ -126,7 +126,8 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, val valueElement = tag.linkElement() val linkSignature = resolveLink(valueElement) if (linkSignature != null) { - val link = "<a docref=\"$linkSignature\">${valueElement!!.getText().htmlEscape()}</a>" + val labelText = tag.getDataElements().firstOrNull { it is PsiDocToken }?.getText() ?: valueElement!!.getText() + val link = "<a docref=\"$linkSignature\">${labelText.htmlEscape()}</a>" if (tag.getName() == "link") "<code>$link</code>" else link } else if (valueElement != null) { |