Is this a known issue with `code` blocks by any ch...
# dokka
e
Is this a known issue with
code
blocks by any chance?
s
is the issue here that it's doing a line break? afaik by default dokka will make code blocks wrap if the lines are too long. it seems that it's wrapping at the following positions:
Copy code
<dependencies>
    <dependency>
        <groupId>com.hcl.mainframe.proto</groupId>
       ^----------------------------
        <artifactId>zproto</artifactId>
        <version>1.0.0-SNAPSHOT</version>
                      ^--------------
    </dependency>
</dependencies>
e
@solonovamax yes exactly, I think those line breaks are unwanted
s
it's not particularly an "issue" with it, it's more "intended behaviour"
e
@solonovamax any way to change it that you know of? In mobile it wraps and it looks awful
s
you could perhaps add a custom style that includes the following css:
Copy code
.symbol:not(.token), code {
    overflow: scroll;
    white-space: nowrap;
}
this causes a very long line to render like this:
image.png
e
Unfortunately no wrap does not respect line breaks anymore. Multiple lines will be folded into a single one, at least based on my test a couple hours ago
s
hmmm, let me check css shit, 1 sec
setting
white-space
to
pre
might work
try that
e
That did the trick indeed! Thanks 🐕
s
np I might make a plugin at some point that fixes a bunch of minor issues like this (with configurable settings) because I've noticed quite a few of them with dokka tbh I'm currently working on a small little plugin that allows you to add custom scripts (because I want to modify the version of prism.js they ship to support more languages)
thank you color 1
@Edoardo Luppi I've finally created that plugin with a bunch of tweaks for dokka you can use it by adding
Copy code
dependencies {
    dokkaPlugin("ca.solo-studios:dokka-style-tweaks-plugin:0.1.1")
}
to your
build.gradle.kts
file. It can then be configured using the type-safe plugin configuration:
Copy code
tasks {
    withType<AbstractDokkaTask>().configureEach {
        pluginConfiguration<DokkaStyleTweaksPlugin, DokkaStyleTweaksConfiguration> {
            minimalScrollbar = true
            darkPurpleHighlight = true
            improvedBlockquoteBorder = true
            lighterBlockquoteText = true
            sectionTabFontWeight = "500"
            sectionTabTransition = true
            improvedSectionTabBorder = true
            disableCodeWrapping = true
        }
    }
}
or via json:
Copy code
tasks {
    withType<AbstractDokkaTask>().configureEach {
        val dokkaTweaksConfiguration = """
            {
                "minimalScrollbar": true,
                "darkPurpleHighlight": true,
                "improvedBlockquoteBorder": true,
                "lighterBlockquoteText": true,
                "sectionTabFontWeight": "500"
                "sectionTabTransition": true,
                "improvedSectionTabBorder": true,
                "disableCodeWrapping": true
            }
        """.trimIndent()

        pluginConfiguration.set(
                mapOf(
                        "ca.solostudios.dokkastyles.plugin.DokkaStyleTweaksPlugin" to dokkaTweaksConfiguration,
                     )
                               )
    }
}
all the tweaks are documented via kdoc, but the source is here: https://github.com/solo-studios/dokka-plugins/blob/master/dokka-style-tweaks-plugin/src/main/kotlin/ca/solostudios/dokkastyles/plugin/DokkaStyleTweaksConfiguration.kt for your issue with the whitespace, simply set
disableCodeWrapping
to true, and it will fix it.