aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-04-17 12:41:26 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-04-30 12:37:58 +0200
commit1d213c8b3aa7abeb75665d1c77adcf2e6071e0f6 (patch)
treee7ac1b11c194b7730b0681f4c81d6a8c81cee406
parente26161b15e53a750e795f6d0d7a74e5cc1f55557 (diff)
downloaddokka-1d213c8b3aa7abeb75665d1c77adcf2e6071e0f6.tar.gz
dokka-1d213c8b3aa7abeb75665d1c77adcf2e6071e0f6.tar.bz2
dokka-1d213c8b3aa7abeb75665d1c77adcf2e6071e0f6.zip
Add parameters tag filtering for primary constructor in constructors page
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index fd6fe6bb..757a84e1 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -5,9 +5,7 @@ import org.jetbrains.dokka.links.Callable
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.links.withClass
import org.jetbrains.dokka.model.*
-import org.jetbrains.dokka.model.doc.Constructor
-import org.jetbrains.dokka.model.doc.Description
-import org.jetbrains.dokka.model.doc.DocumentationNode
+import org.jetbrains.dokka.model.doc.*
import org.jetbrains.dokka.model.properties.PropertyContainer
import org.jetbrains.dokka.pages.PlatformData
import org.jetbrains.dokka.parsers.MarkdownParser
@@ -342,18 +340,18 @@ private class DokkaDescriptorVisitor(
map = PlatformDependent.from(it.map.map {
Pair(
it.key,
- it.value.copy(children = it.value.children.find { it is Constructor }?.root?.let {
+ it.value.copy(children = (it.value.children.find { it is Constructor }?.root?.let { constructor ->
listOf(
- Description(it)
+ Description(constructor)
)
- } ?: emptyList())
+ } ?: emptyList<TagWrapper>()) + it.value.children.filterIsInstance<Param>())
)
}),
- expect = it.expect?.copy(children = it.expect?.children?.find { it is Constructor }?.root?.let {
+ expect = it.expect?.copy(children = (it.expect?.children?.find { it is Constructor }?.root?.let { constructor ->
listOf(
- Description(it)
+ Description(constructor)
)
- } ?: emptyList())
+ } ?: emptyList<TagWrapper>()) + it.expect!!.children.filterIsInstance<Param>())
)
} else {
it