1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package org.jetbrains.dokka.base.renderers.html import kotlinx.html.FlowContent import kotlinx.html.span fun FlowContent.buildBreakableDotSeparatedHtml(name: String) { val phrases = name.split(".") phrases.dropLast(1).forEach { span { +"$it." } wbr { } } span { +phrases.last() } }