diff options
author | Ignat Beresnev <ignat@beresnev.me> | 2021-12-14 10:09:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 10:09:10 +0300 |
commit | ed5d582b1a0f667c21443d1a493ff46bc5860865 (patch) | |
tree | 1733fe31493f742584763895f443f1874a4693ab /plugins/base/src/main/kotlin/translators/documentables | |
parent | bf9d62a7a2bb510d8099bb2bba225b95c2c064f1 (diff) | |
parent | 19b2a2d5d0986fca3cf6766a05d09d7e458aa370 (diff) | |
download | dokka-ed5d582b1a0f667c21443d1a493ff46bc5860865.tar.gz dokka-ed5d582b1a0f667c21443d1a493ff46bc5860865.tar.bz2 dokka-ed5d582b1a0f667c21443d1a493ff46bc5860865.zip |
Merge pull request #2259 from Kotlin/2213-description-list-support
Description list support for JavaDocs (#2213)
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/documentables')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt index 7d4f5c05..8c3fcd84 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt @@ -173,6 +173,18 @@ open class PageContentBuilder( contents += ListBuilder(true, mainDRI, sourceSets, kind, styles, extra).apply(operation).build() } + fun descriptionList( + kind: Kind = ContentKind.Main, + sourceSets: Set<DokkaSourceSet> = mainSourcesetData, + styles: Set<Style> = mainStyles, + extra: PropertyContainer<ContentNode> = mainExtra, + operation: ListBuilder.() -> Unit = {} + ) { + contents += ListBuilder(false, mainDRI, sourceSets, kind, styles + ListStyle.DescriptionList, extra) + .apply(operation) + .build() + } + internal fun headers(vararg label: String) = contentFor(mainDRI, mainSourcesetData) { label.forEach { text(it) } } |