aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt1
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt33
2 files changed, 22 insertions, 12 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
index b0687a06..4252de3b 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
@@ -207,7 +207,6 @@ open class DefaultPageCreator(
}
}
}
-
}
}
diff --git a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt
index 2f04e2a0..9c80a9ea 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/PageContentBuilder.kt
@@ -212,14 +212,14 @@ open class PageContentBuilder(
styles: Set<Style> = mainStyles,
extra: PropertyContainer<ContentNode> = mainExtra
) =
- ContentResolvedLink(
- children = listOf(createText(text, kind, sourceSets, styles, extra)),
- address = address,
- extra = PropertyContainer.empty(),
- dci = DCI(mainDRI, kind),
- sourceSets = sourceSets,
- style = emptySet()
- )
+ ContentResolvedLink(
+ children = listOf(createText(text, kind, sourceSets, styles, extra)),
+ address = address,
+ extra = PropertyContainer.empty(),
+ dci = DCI(mainDRI, kind),
+ sourceSets = sourceSets,
+ style = emptySet()
+ )
fun link(
address: DRI,
@@ -360,7 +360,14 @@ open class PageContentBuilder(
kind: Kind = mainKind,
styles: Set<Style> = mainStyles,
extra: PropertyContainer<ContentNode> = mainExtra
- ) = ContentDivergentGroup(instances.toList(), DCI(mainDRI, kind), styles, extra, groupID, implicitlySourceSetHinted)
+ ) = ContentDivergentGroup(
+ instances.toList(),
+ DCI(mainDRI, kind),
+ styles,
+ extra,
+ groupID,
+ implicitlySourceSetHinted
+ )
}
@ContentBuilderMarker
@@ -382,7 +389,9 @@ open class PageContentBuilder(
extra: PropertyContainer<ContentNode> = mainExtra,
block: DocumentableContentBuilder.() -> Unit
) {
- before = contentFor(dri, sourceSets, kind, styles, extra, block)
+ contentFor(dri, sourceSets, kind, styles, extra, block)
+ .takeIf { it.children.isNotEmpty() }
+ .also { before = it }
}
fun divergent(
@@ -404,7 +413,9 @@ open class PageContentBuilder(
extra: PropertyContainer<ContentNode> = mainExtra,
block: DocumentableContentBuilder.() -> Unit
) {
- after = contentFor(dri, sourceSets, kind, styles, extra, block)
+ contentFor(dri, sourceSets, kind, styles, extra, block)
+ .takeIf { it.children.isNotEmpty() }
+ .also { after = it }
}