aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
diff options
context:
space:
mode:
authorVladimir Kryachko <vkryachko@google.com>2020-03-05 14:49:28 -0500
committerVladimir Kryachko <vkryachko@google.com>2020-03-06 20:01:30 -0500
commita0c490ef850aee1cfdd72de8f98881dc9530f556 (patch)
tree1ecfdc0e4529c1e04b0b68f396bbaec69f99e8cb /core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
parent3df9649bc56cf7ab5ccacb86af97294bd5187feb (diff)
downloaddokka-a0c490ef850aee1cfdd72de8f98881dc9530f556.tar.gz
Fix extension fun/property KDoc issue.
The issue manifests in the following conditions: 1. Library being documented contains a type and extensions for that type 2. The library's package name matches one of externalDocumentationLinks The issue can be seen here: https://screenshot.googleplex.com/hQSeOErJi3J.png Fixed here: https://screenshot.googleplex.com/yejh7Y56QZ5.png Change-Id: Ifef6e38e942a5b2a200f519a5ad977ca8b4ebaea Bug: 150937563
Diffstat (limited to 'core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt')
-rw-r--r--core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt b/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
index b62e51a78..7fbdb1819 100644
--- a/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
+++ b/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt
@@ -456,7 +456,7 @@ open class JavaLayoutHtmlFormatOutputBuilder(
return
}
- val targetLink = node.links.singleOrNull()
+ val targetLink = node.links.firstOrNull()
if (targetLink?.kind == NodeKind.TypeParameter) {
+node.name
@@ -1106,8 +1106,8 @@ open class JavaLayoutHtmlFormatOutputBuilder(
filter { it.getClassExtensionReceiver() != null }
.groupBy {
val receiverType = it.getClassExtensionReceiver()!!
- receiverType.links(NodeKind.ExternalLink).firstOrNull()
- ?: receiverType.links.first { it.kind in NodeKind.classLike}
+ receiverType.links.filter { it.kind != NodeKind.ExternalLink}.firstOrNull() ?:
+ receiverType.links(NodeKind.ExternalLink).first()
}
private fun List<DocumentationNode>.externalExtensions(kind: NodeKind) =