From e961960934e2f43cdfc6ad63126c005866a60003 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 3 Mar 2015 17:13:56 +0100 Subject: use custom 'docref' attribute to represent doc link destination instead o marking href with ## --- src/Java/JavaDocumentationBuilder.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/Java') diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt index 4b1b8116..5720850d 100644 --- a/src/Java/JavaDocumentationBuilder.kt +++ b/src/Java/JavaDocumentationBuilder.kt @@ -91,14 +91,13 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, } private fun createLink(element: Element): ContentBlock { + val docref = element.attr("docref") + if (docref != null) { + return ContentNodeLazyLink(docref, {() -> refGraph.lookup(docref)}) + } val href = element.attr("href") if (href != null) { - if (href.startsWith("##")) { - val signature = href.substring(2) - return ContentNodeLazyLink(signature, {() -> refGraph.lookup(signature)}) - } else { - return ContentExternalLink(href) - } + return ContentExternalLink(href) } else { return ContentBlock() } @@ -126,7 +125,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, val valueElement = tag.linkElement() val linkSignature = resolveLink(valueElement) if (linkSignature != null) { - val link = "${valueElement!!.getText().htmlEscape()}" + val link = "${valueElement!!.getText().htmlEscape()}" if (tag.getName() == "link") "$link" else link } else if (valueElement != null) { -- cgit