aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src')
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt2
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt5
-rw-r--r--plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt3
-rw-r--r--plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt4
4 files changed, 8 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt
index 42422934..9a11c126 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt
@@ -62,7 +62,7 @@ class SourceLinksTransformer(val context: DokkaContext, val builder: PageContent
emptyList(),
sources.map {
buildGroup(node.dri, setOf(it.first), kind = ContentKind.Source) {
- +link("(source)", it.second)
+ link("(source)", it.second)
}
},
DCI(node.dri, ContentKind.Source),
diff --git a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt
index 58b384e2..94aa2c5a 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt
@@ -244,8 +244,8 @@ open class PageContentBuilder(
sourceSets: Set<DokkaSourceSet> = mainSourcesetData,
styles: Set<Style> = mainStyles,
extra: PropertyContainer<ContentNode> = mainExtra
- ) =
- ContentResolvedLink(
+ ) {
+ contents += ContentResolvedLink(
children = listOf(createText(text, kind, sourceSets, styles, extra)),
address = address,
extra = PropertyContainer.empty(),
@@ -253,6 +253,7 @@ open class PageContentBuilder(
sourceSets = sourceSets,
style = emptySet()
)
+ }
fun link(
address: DRI,
diff --git a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt
index 8e58bbcd..b5523d50 100644
--- a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt
+++ b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt
@@ -12,8 +12,9 @@ import org.jetbrains.dokka.testApi.context.MockContext
import org.jetbrains.dokka.utilities.DokkaConsoleLogger
import renderers.html.EmptyCommentConverter
-abstract class RenderingOnlyTestBase {
+abstract class RenderingOnlyTestBase<T> {
abstract val context: MockContext
+ abstract val renderedContent: T
}
class TestPage(callback: PageContentBuilder.DocumentableContentBuilder.() -> Unit) : RootPageNode(), ContentPage {
diff --git a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt
index 69025947..4f51a97d 100644
--- a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt
+++ b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt
@@ -19,7 +19,7 @@ import org.jsoup.nodes.TextNode
import renderers.RenderingOnlyTestBase
import utils.TestOutputWriter
-abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase() {
+abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase<Element>() {
val files = TestOutputWriter()
override val context = MockContext(
@@ -33,7 +33,7 @@ abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase() {
)
)
- protected val renderedContent: Element by lazy {
+ override val renderedContent: Element by lazy {
files.contents.getValue("test-page.html").let { Jsoup.parse(it) }.select("#content").single()
}