diff options
4 files changed, 20 insertions, 6 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) } 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 diff --git a/plugins/base/src/main/resources/dokka/styles/style.css b/plugins/base/src/main/resources/dokka/styles/style.css index f0f2d31a..0d1314c9 100644 --- a/plugins/base/src/main/resources/dokka/styles/style.css +++ b/plugins/base/src/main/resources/dokka/styles/style.css @@ -143,6 +143,7 @@ .divergent-group .table-row { background-color: #F4F4F4; + border-bottom: 2px solid white; } .title > .divergent-group:first-of-type { diff --git a/plugins/gfm/src/main/kotlin/GfmPlugin.kt b/plugins/gfm/src/main/kotlin/GfmPlugin.kt index b10a45b8..fb83d3b0 100644 --- a/plugins/gfm/src/main/kotlin/GfmPlugin.kt +++ b/plugins/gfm/src/main/kotlin/GfmPlugin.kt @@ -111,7 +111,11 @@ open class CommonmarkRenderer( append("\n\n") } - override fun StringBuilder.buildPlatformDependent(content: PlatformHintedContent, pageContext: ContentPage) { + override fun StringBuilder.buildPlatformDependent( + content: PlatformHintedContent, + pageContext: ContentPage, + sourceSetRestriction: Set<SourceSetData>? + ) { val distinct = content.sourceSets.map { it to StringBuilder().apply {buildContentNode(content.inner, pageContext, setOf(it)) }.toString() }.groupBy(Pair<SourceSetData, String>::second, Pair<SourceSetData, String>::first) |