diff options
author | Kamil Doległo <9080183+kamildoleglo@users.noreply.github.com> | 2021-01-04 12:59:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 12:59:03 +0100 |
commit | d3f0e03284999e6f7fac99a345ed91cb63503706 (patch) | |
tree | 0becbb39444fbf7ee9300adc1fb6b04861ec54f6 /plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt | |
parent | 6b0cdf3102b1f1dd213ca0c2e2c333f8756be6b4 (diff) | |
download | dokka-d3f0e03284999e6f7fac99a345ed91cb63503706.tar.gz dokka-d3f0e03284999e6f7fac99a345ed91cb63503706.tar.bz2 dokka-d3f0e03284999e6f7fac99a345ed91cb63503706.zip |
Refactor ContentTable builder and fix GFM table rendering (#1682)
Diffstat (limited to 'plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt')
-rw-r--r-- | plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt b/plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt index 7f441aa1..a333d7c4 100644 --- a/plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt +++ b/plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt @@ -41,22 +41,23 @@ class MultimodulePageCreator( ) { header(2, "All modules:") table(styles = setOf(MultimoduleTable)) { - modules.map { module -> + modules.forEach { module -> val displayedModuleDocumentation = getDisplayedModuleDocumentation(module) val dri = DRI(packageName = MULTIMODULE_PACKAGE_PLACEHOLDER, classNames = module.name) val dci = DCI(setOf(dri), ContentKind.Comment) val extraWithAnchor = PropertyContainer.withAll(SymbolAnchorHint(module.name, ContentKind.Main)) - val header = linkNode(module.name, dri, DCI(setOf(dri), ContentKind.Main), extra = extraWithAnchor) - val content = ContentGroup( - children = - if (displayedModuleDocumentation != null) - DocTagToContentConverter().buildContent(displayedModuleDocumentation, dci, emptySet()) - else emptyList(), - dci = dci, - sourceSets = emptySet(), - style = emptySet() - ) - ContentGroup(listOf(header, content), dci, emptySet(), emptySet(), extraWithAnchor) + row(setOf(dri), emptySet(), styles = emptySet(), extra = extraWithAnchor) { + linkNode(module.name, dri, DCI(setOf(dri), ContentKind.Main), extra = extraWithAnchor) + +ContentGroup( + children = + if (displayedModuleDocumentation != null) + DocTagToContentConverter().buildContent(displayedModuleDocumentation, dci, emptySet()) + else emptyList(), + dci = dci, + sourceSets = emptySet(), + style = emptySet() + ) + } } } } |