diff options
author | KrystianUjma <kujma@virtuslab.com> | 2019-01-18 15:36:25 +0100 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2019-02-25 18:29:13 +0300 |
commit | 5b451ab6abf60e15c8044daebc90c3a46c21c4fb (patch) | |
tree | 236746dafa9ad77a82db28db2c34bc4a0502ccae /core/src/main/kotlin | |
parent | 46af103c8dd43839e898368dbda744fa522e9789 (diff) | |
download | dokka-5b451ab6abf60e15c8044daebc90c3a46c21c4fb.tar.gz dokka-5b451ab6abf60e15c8044daebc90c3a46c21c4fb.tar.bz2 dokka-5b451ab6abf60e15c8044daebc90c3a46c21c4fb.zip |
Fix java doc primary constructors have duplicated parameters
#341 Fixed
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r-- | core/src/main/kotlin/javadoc/docbase.kt | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/core/src/main/kotlin/javadoc/docbase.kt b/core/src/main/kotlin/javadoc/docbase.kt index aeb806f1..fcc017fd 100644 --- a/core/src/main/kotlin/javadoc/docbase.kt +++ b/core/src/main/kotlin/javadoc/docbase.kt @@ -521,12 +521,13 @@ class ModuleNodeAdapter(val module: DocumentationModule, val reporter: DocErrorR } private fun DocumentationNodeAdapter.collectParamTags(kind: NodeKind, sectionFilter: (ContentSection) -> Boolean) = - (node.details(kind) - .filter(DocumentationNode::hasNonEmptyContent) - .map { ParamTagAdapter(module, this, it.name, true, it.content.children) } + (node.details(kind) + .filter(DocumentationNode::hasNonEmptyContent) + .map { ParamTagAdapter(module, this, it.name, true, it.content.children) } - + node.content.sections - .filter(sectionFilter) - .map { ParamTagAdapter(module, this, it.subjectName ?: "?", true, it.children) }) - - .toTypedArray()
\ No newline at end of file + + node.content.sections + .filter(sectionFilter) + .map { ParamTagAdapter(module, this, it.subjectName ?: "?", true, it.children) } + ) + .distinctBy { it.parameterName } + .toTypedArray()
\ No newline at end of file |