aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/pages/ContentNodes.kt7
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt2
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") {