aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2021-12-07 20:34:40 +0300
committerIgnat Beresnev <ignat.beresnev@jetbrains.com>2021-12-07 20:34:40 +0300
commit19b2a2d5d0986fca3cf6766a05d09d7e458aa370 (patch)
tree2640b5ab954302b2591fe18ee366336488c6cdf3 /plugins/base/src
parent349d841a31a172c810c864725d1d5b0b23bc96be (diff)
downloaddokka-19b2a2d5d0986fca3cf6766a05d09d7e458aa370.tar.gz
dokka-19b2a2d5d0986fca3cf6766a05d09d7e458aa370.tar.bz2
dokka-19b2a2d5d0986fca3cf6766a05d09d7e458aa370.zip
Remove duplicated rendering of top level description tags
Diffstat (limited to 'plugins/base/src')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt20
1 files changed, 1 insertions, 19 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index 727b009c..c3b15738 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -305,31 +305,13 @@ open class HtmlRenderer(
ol { buildListItems(node.children, pageContext, sourceSetRestriction) }
}
node.hasStyle(ListStyle.DescriptionList) -> {
- dl { buildListItems(node.children, pageContext, sourceSetRestriction) }
+ dl { node.children.forEach { it.build(this, pageContext, sourceSetRestriction) } }
}
else -> {
ul { buildListItems(node.children, pageContext, sourceSetRestriction) }
}
}
- open fun DL.buildListItems(
- items: List<ContentNode>,
- pageContext: ContentPage,
- sourceSetRestriction: Set<DisplaySourceSet>? = null
- ) {
- items.forEach {
- when {
- it.hasStyle(ListStyle.DescriptionTerm) -> dt {
- it.build(this@buildListItems, pageContext, sourceSetRestriction)
- }
- it.hasStyle(ListStyle.DescriptionDetails) -> dd {
- it.build(this@buildListItems, pageContext, sourceSetRestriction)
- }
- else -> it.build(this, pageContext, sourceSetRestriction)
- }
- }
- }
-
open fun OL.buildListItems(
items: List<ContentNode>,
pageContext: ContentPage,