aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
diff options
context:
space:
mode:
authorFilip Zybała <fzybala@virtuslab.com>2020-06-23 13:52:20 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-06-24 10:41:33 +0200
commit8a221a9084bf4fbc79b514c7f113fa2c4cb3dcfd (patch)
treedc9f6337973d0e8f0918431e831f176b5e680939 /plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
parent4b886742cba287860b6e9c0d3f98781b60fe75da (diff)
downloaddokka-8a221a9084bf4fbc79b514c7f113fa2c4cb3dcfd.tar.gz
dokka-8a221a9084bf4fbc79b514c7f113fa2c4cb3dcfd.tar.bz2
dokka-8a221a9084bf4fbc79b514c7f113fa2c4cb3dcfd.zip
Platform restriction handling for platform-hinted content
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt')
-rw-r--r--plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
index 1684f819..141a18e6 100644
--- a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
@@ -45,8 +45,11 @@ abstract class DefaultRenderer<T>(
abstract fun buildPage(page: ContentPage, content: (T, ContentPage) -> Unit): String
abstract fun buildError(node: ContentNode)
- open fun T.buildPlatformDependent(content: PlatformHintedContent, pageContext: ContentPage) =
- buildContentNode(content.inner, pageContext)
+ open fun T.buildPlatformDependent(
+ content: PlatformHintedContent,
+ pageContext: ContentPage,
+ sourceSetRestriction: Set<SourceSetData>?
+ ) = buildContentNode(content.inner, pageContext)
open fun T.buildGroup(
node: ContentGroup,
@@ -110,7 +113,7 @@ abstract class DefaultRenderer<T>(
is ContentTable -> buildTable(node, pageContext, sourceSetRestriction)
is ContentGroup -> buildGroup(node, pageContext, sourceSetRestriction)
is ContentBreakLine -> buildNewLine()
- is PlatformHintedContent -> buildPlatformDependent(node, pageContext)
+ is PlatformHintedContent -> buildPlatformDependent(node, pageContext, sourceSetRestriction)
is ContentDivergentGroup -> buildDivergent(node, pageContext)
else -> buildError(node)
}