aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/model/doc/DocTag.kt7
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt10
-rw-r--r--plugins/base/src/test/kotlin/utils/TestUtils.kt3
3 files changed, 4 insertions, 16 deletions
diff --git a/core/src/main/kotlin/model/doc/DocTag.kt b/core/src/main/kotlin/model/doc/DocTag.kt
index 8a9521ab..812acd62 100644
--- a/core/src/main/kotlin/model/doc/DocTag.kt
+++ b/core/src/main/kotlin/model/doc/DocTag.kt
@@ -6,13 +6,6 @@ sealed class DocTag(
val children: List<DocTag>,
val params: Map<String, String>
) {
- fun docTagSummary(): String {
- if(this.children.isEmpty() && this is Text)
- return this.body
-
- return this.children.joinToString(" ") { it.docTagSummary() }
- }
-
override fun equals(other: Any?): Boolean =
(
other != null &&
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
index 51e95160..d1086132 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
@@ -163,7 +163,7 @@ open class DefaultPageCreator(
}
if (c is DEnum) {
block("Entries", 2, ContentKind.Classlikes, c.entries, c.sourceSets.toSet()) {
- link(it.name, it.dri, kind = ContentKind.Main)
+ link(it.name, it.dri)
sourceSetDependentHint(it.dri, it.sourceSets.toSet(), kind = ContentKind.SourceSetDependantHint) {
+buildSignature(it)
contentForBrief(it)
@@ -317,7 +317,7 @@ open class DefaultPageCreator(
root?.let {
group(sourceSets = setOf(platform), kind = ContentKind.BriefComment) {
- text(it.docTagSummary(), kind = ContentKind.Comment)
+ comment(it)
}
}
}
@@ -353,7 +353,7 @@ open class DefaultPageCreator(
divergentGroup(
ContentDivergentGroup.GroupID(name),
elements.map { it.dri }.toSet(),
- kind = ContentKind.Symbol
+ kind = ContentKind.SourceSetDependantHint
) {
elements.map {
instance(setOf(it.dri), it.sourceSets.toSet()) {
@@ -363,9 +363,7 @@ open class DefaultPageCreator(
}
}
after {
- group(kind = ContentKind.BriefComment) {
- contentForBrief(it)
- }
+ contentForBrief(it)
}
}
}
diff --git a/plugins/base/src/test/kotlin/utils/TestUtils.kt b/plugins/base/src/test/kotlin/utils/TestUtils.kt
index 41c245e6..6bc624d6 100644
--- a/plugins/base/src/test/kotlin/utils/TestUtils.kt
+++ b/plugins/base/src/test/kotlin/utils/TestUtils.kt
@@ -43,9 +43,6 @@ interface AssertDSL {
inline fun <reified T : Any> Any?.assertIsInstance(name: String): T =
this.let { it as? T } ?: throw AssertionError("$name should not be null")
-fun List<DocumentationNode>.commentsToString(): String =
- this.flatMap { it.children }.joinToString(separator = "\n") { it.root.docTagSummary() }
-
fun TagWrapper.text(): String = when (val t = this) {
is NamedTagWrapper -> "${t.name}: [${t.root.text()}]"
else -> t.root.text()