diff options
Diffstat (limited to 'plugins/base/src/main/kotlin')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 7 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt | 2 |
2 files changed, 7 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 31753332..a6c7e326 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -685,7 +685,12 @@ open class HtmlRenderer( code.children.forEach { buildContentNode(it, pageContext) } } } - copyButton() + /* + Disable copy button on samples as: + - it is useless + - it overflows with playground's run button + */ + if(!code.style.contains(ContentStyle.RunnableSample)) copyButton() } } diff --git a/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt index ca239d83..88b88cf8 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/samples/SamplesTransformer.kt @@ -29,7 +29,7 @@ abstract class SamplesTransformer(val context: DokkaContext) : PageTransformer { final override fun invoke(input: RootPageNode): RootPageNode { val analysis = setUpAnalysis(context) val kotlinPlaygroundScript = - "<script src=\"https://unpkg.com/kotlin-playground@1\" data-selector=\"code.runnablesample\"></script>" + "<script src=\"https://unpkg.com/kotlin-playground@1\"></script>" return input.transformContentPagesTree { page -> page.documentable?.documentation?.entries?.fold(page) { acc, entry -> |