From 21b2fcb46a10acc2afdf94639cd208d15856fdc3 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Thu, 3 Nov 2016 12:50:37 +0300 Subject: Fix for KT-14076 : empty visible div's (#108) Fix for KT-14076 : empty visible div's --- core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt | 5 ++++- core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'core/src') 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("
") + ensureParagraph() block() - to.append("
") + ensureParagraph() + to.append("
") } override fun appendLink(href: String, body: () -> Unit) = wrap("", "", 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 }) -- cgit