diff options
author | Filip Zybała <fzybala@virtuslab.com> | 2020-06-23 13:52:20 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-06-24 10:41:33 +0200 |
commit | 8a221a9084bf4fbc79b514c7f113fa2c4cb3dcfd (patch) | |
tree | dc9f6337973d0e8f0918431e831f176b5e680939 /plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | |
parent | 4b886742cba287860b6e9c0d3f98781b60fe75da (diff) | |
download | dokka-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/html/HtmlRenderer.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 8104d399..43722888 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -135,9 +135,15 @@ open class HtmlRenderer( } } - override fun FlowContent.buildPlatformDependent(content: PlatformHintedContent, pageContext: ContentPage) = + override fun FlowContent.buildPlatformDependent( + content: PlatformHintedContent, + pageContext: ContentPage, + sourceSetRestriction: Set<SourceSetData>? + ) = buildPlatformDependent( - content.sourceSets.map { it to setOf(content.inner) }.toMap(), + content.sourceSets.filter { + sourceSetRestriction == null || it in sourceSetRestriction + }.map { it to setOf(content.inner) }.toMap(), pageContext, content.extra, content.style |