aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers/pages
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2022-08-05 13:25:55 +0200
committerGitHub <noreply@github.com>2022-08-05 13:25:55 +0200
commitefed96e969d8f5afe21197805851aca65ceb643a (patch)
treea848d331d8db45393452c704ccaf17e704b062eb /plugins/base/src/main/kotlin/transformers/pages
parent7b020f000aa7ea868d5d3037e68eaec621ef9972 (diff)
downloaddokka-efed96e969d8f5afe21197805851aca65ceb643a.tar.gz
dokka-efed96e969d8f5afe21197805851aca65ceb643a.tar.bz2
dokka-efed96e969d8f5afe21197805851aca65ceb643a.zip
Add a distinct divider between function/property overloads (#2585)
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/pages')
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt b/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt
index 6c12c719..003d68cf 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt
@@ -6,6 +6,10 @@ import org.jetbrains.dokka.model.dfs
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.utilities.DokkaLogger
+/**
+ * Merges [MemberPage] elements that have the same name.
+ * That includes **both** properties and functions.
+ */
class SameMethodNamePageMergerStrategy(val logger: DokkaLogger) : PageMergerStrategy {
override fun tryMerge(pages: List<PageNode>, path: List<String>): List<PageNode> {
val members = pages.filterIsInstance<MemberPageNode>().takeIf { it.isNotEmpty() } ?: return pages