diff options
author | vmishenev <vad-mishenev@yandex.ru> | 2021-11-23 04:26:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 04:26:43 +0300 |
commit | af81f9db62cdff3baaf8cc81835457940747ebe6 (patch) | |
tree | 4a2913b674cd05c3ec904ec8a5d535809204ad2a /plugins | |
parent | 7084461ddd4045fc8ed0a798b1351a0577588021 (diff) | |
download | dokka-af81f9db62cdff3baaf8cc81835457940747ebe6.tar.gz dokka-af81f9db62cdff3baaf8cc81835457940747ebe6.tar.bz2 dokka-af81f9db62cdff3baaf8cc81835457940747ebe6.zip |
Add space between funs descriptions (#2235)
Diffstat (limited to 'plugins')
4 files changed, 10 insertions, 2 deletions
diff --git a/plugins/base/base-test-utils/api/base-test-utils.api b/plugins/base/base-test-utils/api/base-test-utils.api index 844a1703..c822d16b 100644 --- a/plugins/base/base-test-utils/api/base-test-utils.api +++ b/plugins/base/base-test-utils/api/base-test-utils.api @@ -104,6 +104,10 @@ public final class utils/B : utils/Tag { public fun <init> ([Ljava/lang/Object;)V } +public final class utils/Br : utils/Tag { + public static final field INSTANCE Lutils/Br; +} + public final class utils/Div : utils/Tag { public fun <init> ([Ljava/lang/Object;)V } diff --git a/plugins/base/base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt b/plugins/base/base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt index 9e38df10..47c9608a 100644 --- a/plugins/base/base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt +++ b/plugins/base/base-test-utils/src/main/kotlin/renderers/JsoupUtils.kt @@ -30,6 +30,7 @@ class B(vararg matchers: Any) : Tag("b", *matchers) class I(vararg matchers: Any) : Tag("i", *matchers) class STRIKE(vararg matchers: Any) : Tag("strike", *matchers) object Wbr : Tag("wbr") +object Br : Tag("br") private fun Any.accepts(n: Node, ignoreSpan:Boolean = true) { when (this) { is String -> assert(n is TextNode && n.text().trim() == this.trim()) { "\"$this\" expected but found: $n" } diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 91e49a13..c5b0e511 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -278,6 +278,8 @@ open class HtmlRenderer( distinctInstances.firstOrNull()?.after ?: if (i != distinct.size - 1) ContentBreakLine(it.key) else null ) + if(node.dci.kind == ContentKind.Main && i != distinct.size - 1) + contentOfSourceSet.add(ContentBreakLine(it.key)) } contentOfSourceSet } diff --git a/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt b/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt index 6a504634..f9dd92da 100644 --- a/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt +++ b/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt @@ -5,6 +5,7 @@ import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.pages.ContentDivergentGroup import org.junit.jupiter.api.Test import renderers.testPage +import utils.Br import utils.match import kotlin.test.assertEquals @@ -184,7 +185,7 @@ class DivergentTest : HtmlRenderingOnlyTestBase() { HtmlRenderer(context).render(page) val content = renderedContent - content.select("[data-togglable=DEFAULT/native]").single().match("aa+ee+") + content.select("[data-togglable=DEFAULT/native]").single().match("aa+", Br, "ee+") content.select("[data-togglable=DEFAULT/js]").single().match("bdbd+") content.select("[data-togglable=DEFAULT/jvm]").single().match("c") } @@ -306,6 +307,6 @@ class DivergentTest : HtmlRenderingOnlyTestBase() { } HtmlRenderer(context).render(page) - renderedContent.select("[data-togglable=DEFAULT/native]").single().match("a-aab+b-bab+") + renderedContent.select("[data-togglable=DEFAULT/native]").single().match("a-aab+", Br, "b-bab+") } } |