aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt5
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt4
2 files changed, 8 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt b/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt
index 03cf7fc8..bc9358ac 100644
--- a/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt
+++ b/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt
@@ -52,8 +52,11 @@ class KotlinWebsiteOutputBuilder(to: StringBuilder,
}
override fun appendAsOverloadGroup(to: StringBuilder, block: () -> Unit) {
+ to.append("<div class=\"overload-group\" markdown=\"1\">")
+ ensureParagraph()
block()
- to.append("<div class=\"overload-group\"></div>")
+ ensureParagraph()
+ to.append("</div>")
}
override fun appendLink(href: String, body: () -> Unit) = wrap("<a href=\"$href\">", "</a>", body)
diff --git a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
index e6ef792a..e7419ec8 100644
--- a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
+++ b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
@@ -15,6 +15,10 @@ class KotlinWebSiteFormatTest {
verifyKWSNodeByName("returnTag", "indexOf")
}
+ @Test fun overloadGroup() {
+ verifyKWSNodeByName("overloadGroup", "magic")
+ }
+
private fun verifyKWSNodeByName(fileName: String, name: String) {
verifyOutput("testdata/format/website/$fileName.kt", ".md") { model, output ->
kwsService.createOutputBuilder(output, tempLocation).appendNodes(model.members.single().members.filter { it.name == name })