From 19b2a2d5d0986fca3cf6766a05d09d7e458aa370 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 7 Dec 2021 20:34:40 +0300 Subject: Remove duplicated rendering of top level description tags --- plugins/base/api/base.api | 2 -- .../src/main/kotlin/renderers/html/HtmlRenderer.kt | 20 +------------------- 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'plugins') diff --git a/plugins/base/api/base.api b/plugins/base/api/base.api index 79f12366..9450476b 100644 --- a/plugins/base/api/base.api +++ b/plugins/base/api/base.api @@ -351,10 +351,8 @@ public class org/jetbrains/dokka/base/renderers/html/HtmlRenderer : org/jetbrain public static synthetic fun buildLink$default (Lorg/jetbrains/dokka/base/renderers/html/HtmlRenderer;Lkotlinx/html/FlowContent;Lorg/jetbrains/dokka/links/DRI;Ljava/util/List;Lorg/jetbrains/dokka/pages/PageNode;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public synthetic fun buildList (Ljava/lang/Object;Lorg/jetbrains/dokka/pages/ContentList;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;)V public fun buildList (Lkotlinx/html/FlowContent;Lorg/jetbrains/dokka/pages/ContentList;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;)V - public fun buildListItems (Lkotlinx/html/DL;Ljava/util/List;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;)V public fun buildListItems (Lkotlinx/html/OL;Ljava/util/List;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;)V public fun buildListItems (Lkotlinx/html/UL;Ljava/util/List;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;)V - public static synthetic fun buildListItems$default (Lorg/jetbrains/dokka/base/renderers/html/HtmlRenderer;Lkotlinx/html/DL;Ljava/util/List;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;ILjava/lang/Object;)V public static synthetic fun buildListItems$default (Lorg/jetbrains/dokka/base/renderers/html/HtmlRenderer;Lkotlinx/html/OL;Ljava/util/List;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;ILjava/lang/Object;)V public static synthetic fun buildListItems$default (Lorg/jetbrains/dokka/base/renderers/html/HtmlRenderer;Lkotlinx/html/UL;Ljava/util/List;Lorg/jetbrains/dokka/pages/ContentPage;Ljava/util/Set;ILjava/lang/Object;)V public synthetic fun buildNavigation (Ljava/lang/Object;Lorg/jetbrains/dokka/pages/PageNode;)V 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, - pageContext: ContentPage, - sourceSetRestriction: Set? = 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, pageContext: ContentPage, -- cgit