diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-07-15 09:00:51 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-07-15 12:15:50 +0200 |
commit | 06ac15a2907fd5c7a6ef0576ffa51f4937a29e0d (patch) | |
tree | ea8e76159a391ba10d273124a11ebb08cc459ffe /plugins/javadoc/src/main | |
parent | 34e696f92aaa3802f13a0074003bc8957218aeba (diff) | |
download | dokka-06ac15a2907fd5c7a6ef0576ffa51f4937a29e0d.tar.gz dokka-06ac15a2907fd5c7a6ef0576ffa51f4937a29e0d.tar.bz2 dokka-06ac15a2907fd5c7a6ef0576ffa51f4937a29e0d.zip |
Changing javadoc anchor format to Java 12 one
Diffstat (limited to 'plugins/javadoc/src/main')
-rw-r--r-- | plugins/javadoc/src/main/kotlin/javadoc/location/JavadocLocationProvider.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/javadoc/src/main/kotlin/javadoc/location/JavadocLocationProvider.kt b/plugins/javadoc/src/main/kotlin/javadoc/location/JavadocLocationProvider.kt index 3a48261c..49278b06 100644 --- a/plugins/javadoc/src/main/kotlin/javadoc/location/JavadocLocationProvider.kt +++ b/plugins/javadoc/src/main/kotlin/javadoc/location/JavadocLocationProvider.kt @@ -76,7 +76,7 @@ class JavadocLocationProvider(pageRoot: RootPageNode, dokkaContext: DokkaContext } private fun JavadocFunctionNode.getAnchor(): String = - "$name-${parameters.joinToString("-") { + "$name(${parameters.joinToString(",") { when (val bound = if (it.typeBound is org.jetbrains.dokka.model.Nullable) it.typeBound.inner else it.typeBound) { is TypeConstructor -> bound.dri.classNames.orEmpty() is OtherParameter -> bound.name @@ -85,15 +85,15 @@ class JavadocLocationProvider(pageRoot: RootPageNode, dokkaContext: DokkaContext is JavaObject -> "Object" else -> bound.toString() } - }}-" + }})" fun anchorForFunctionNode(node: JavadocFunctionNode) = node.getAnchor() private fun anchorForDri(dri: DRI): String = dri.callable?.let { callable -> - "${callable.name}-${callable.params.joinToString("-") { + "${callable.name}(${callable.params.joinToString(",") { ((it as? Nullable)?.wrapped ?: it).toString() - }}-" + }})" } ?: dri.classNames.orEmpty() override fun resolve(node: PageNode, context: PageNode?, skipExtension: Boolean): String = |