diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2020-03-02 17:10:16 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-03-04 14:28:14 +0100 |
commit | 973cc5238e2f7ede6d9cf54437785770a3e020c9 (patch) | |
tree | a1e3e9176c37b33a4c900b3abf1f23f501b05931 /plugins/base/src/main | |
parent | 1347329aa18203e9657e096447e0e30ae759b137 (diff) | |
download | dokka-973cc5238e2f7ede6d9cf54437785770a3e020c9.tar.gz dokka-973cc5238e2f7ede6d9cf54437785770a3e020c9.tar.bz2 dokka-973cc5238e2f7ede6d9cf54437785770a3e020c9.zip |
Tests for wrapping groups in renderer. Also util for groups
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt index 176aa87f..8d04e986 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt @@ -85,7 +85,7 @@ open class PageContentBuilder( } fun signature(f: Function, block: DocumentableContentBuilder.() -> Unit) { - contents += group(f.dri, f.platformData.toSet(), ContentKind.Symbol, mainStyles, mainExtras, block) + contents += buildGroup(f.dri, f.platformData.toSet(), ContentKind.Symbol, mainStyles, mainExtras, block) } fun signature(f: Function) = signature(f) { @@ -145,7 +145,7 @@ open class PageContentBuilder( contents += ContentTable( emptyList(), elements.map { - group(it.dri, it.platformData.toSet(), kind, styles, extras) { + buildGroup(it.dri, it.platformData.toSet(), kind, styles, extras) { // TODO this will fail operation(it) } @@ -228,6 +228,17 @@ open class PageContentBuilder( styles: Set<Style> = mainStyles, extras: Set<Extra> = mainExtras, block: DocumentableContentBuilder.() -> Unit + ) { + contents += buildGroup(dri, platformData, kind, styles, extras, block) + } + + fun buildGroup( + dri: DRI = mainDRI, + platformData: Set<PlatformData> = mainPlatformData, + kind: Kind = ContentKind.Main, + styles: Set<Style> = mainStyles, + extras: Set<Extra> = mainExtras, + block: DocumentableContentBuilder.() -> Unit ): ContentGroup = contentFor(dri, platformData, kind, styles, extras, block) protected fun createText( |