Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to merge implicit expect-actual declarations #2316

Merged
merged 17 commits into from
Feb 21, 2022
Next Next commit
Add option to merge no expect-actual declarations
  • Loading branch information
vmishenev committed Feb 21, 2022
commit 929764085298cbd8f2660aff281f7714909dc412
4 changes: 3 additions & 1 deletion plugins/base/src/main/kotlin/DokkaBaseConfiguration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ data class DokkaBaseConfiguration(
var customStyleSheets: List<File> = defaultCustomStyleSheets,
var customAssets: List<File> = defaultCustomAssets,
var separateInheritedMembers: Boolean = separateInheritedMembersDefault,
var footerMessage: String = defaultFooterMessage
var footerMessage: String = defaultFooterMessage,
var mergeNoExpectActualDeclarations: Boolean = mergeNoExpectActualDeclarationsDefault
vmishenev marked this conversation as resolved.
Show resolved Hide resolved
) : ConfigurableBlock {
companion object {
val defaultFooterMessage = "© ${Year.now().value} Copyright"
val defaultCustomStyleSheets: List<File> = emptyList()
val defaultCustomAssets: List<File> = emptyList()
const val separateInheritedMembersDefault: Boolean = false
const val mergeNoExpectActualDeclarationsDefault: Boolean = false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class SameMethodNamePageMergerStrategy(val logger: DokkaLogger) : PageMergerStra
.reduce { acc, node ->
acc.mapTransform<ContentDivergentGroup, ContentNode> { g ->
g.copy(children = (g.children +
(node.dfs { it is ContentDivergentGroup && it.groupID == g.groupID } as? ContentDivergentGroup)
?.children?.single()
).filterNotNull()
((node.dfs { it is ContentDivergentGroup && it.groupID == g.groupID } as? ContentDivergentGroup)
?.children ?: emptyList())
)
)
}
}
Expand Down
Loading