diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2021-12-07 20:34:40 +0300 |
---|---|---|
committer | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2021-12-07 20:34:40 +0300 |
commit | 19b2a2d5d0986fca3cf6766a05d09d7e458aa370 (patch) | |
tree | 2640b5ab954302b2591fe18ee366336488c6cdf3 /plugins/base/src | |
parent | 349d841a31a172c810c864725d1d5b0b23bc96be (diff) | |
download | dokka-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.kt | 20 |
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, |