From 30925c0b1ee9c7ca50dd2fc62890dd6ff9a28800 Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Tue, 31 Mar 2020 15:56:31 +0200 Subject: Make parameters no longer platform tagged as they are part of platform hinted description --- core/src/main/kotlin/pages/ContentNodes.kt | 7 +++---- plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt index 03014530..c1792759 100644 --- a/core/src/main/kotlin/pages/ContentNodes.kt +++ b/core/src/main/kotlin/pages/ContentNodes.kt @@ -170,10 +170,9 @@ enum class ContentKind : Kind { Comment, Constructors, Functions, Parameters, Properties, Classlikes, Packages, Symbol, Sample, Main, BriefComment, Empty; companion object{ - fun shouldBePlatformTagged(kind: Kind) : Boolean { - val platformTagged = listOf(Constructors, Functions, Parameters, Properties, Classlikes, Packages) - return platformTagged.contains(kind) - } + private val platformTagged = setOf(Constructors, Functions, Properties, Classlikes, Packages) + + fun shouldBePlatformTagged(kind: Kind) : Boolean = kind in platformTagged } } diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 2214cda6..613e5387 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -120,7 +120,7 @@ open class HtmlRenderer( pageContext: ContentPage, platformRestriction: PlatformData? ) { - node.children.forEach { + node.children.filter { platformRestriction == null || platformRestriction in it.platforms }.forEach { tr("platform-tagged") { it.children.forEach { td("content") { -- cgit