diff options
Diffstat (limited to 'core')
5 files changed, 5 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt b/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt index 007e9353..9a43f9c4 100644 --- a/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt +++ b/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt @@ -164,7 +164,7 @@ class KotlinWebsiteRunnableSamplesOutputBuilder(to: StringBuilder, div(to, "sample", true) { appendBlockCode(language) { imports() - wrap("\nfun main(args: Array<String>) {", "}") { + wrap("\n\nfun main(args: Array<String>) {", "}") { wrap("\n//sampleStart\n", "\n//sampleEnd\n", body) } } diff --git a/core/testdata/format/website-samples/dropImport.md b/core/testdata/format/website-samples/dropImport.md index 13c8fb79..1e05678b 100644 --- a/core/testdata/format/website-samples/dropImport.md +++ b/core/testdata/format/website-samples/dropImport.md @@ -12,6 +12,7 @@ layout: api ``` kotlin import some.* + fun main(args: Array<String>) { //sampleStart diff --git a/core/testdata/format/website-samples/newLinesInSamples.md b/core/testdata/format/website-samples/newLinesInSamples.md index 448725c3..5344b983 100644 --- a/core/testdata/format/website-samples/newLinesInSamples.md +++ b/core/testdata/format/website-samples/newLinesInSamples.md @@ -12,6 +12,7 @@ layout: api ``` kotlin + fun main(args: Array<String>) { //sampleStart val words = listOf("a", "abc", "ab", "def", "abcd") diff --git a/core/testdata/format/website-samples/sample.md b/core/testdata/format/website-samples/sample.md index 203f1b02..b29075a7 100644 --- a/core/testdata/format/website-samples/sample.md +++ b/core/testdata/format/website-samples/sample.md @@ -18,6 +18,7 @@ applied to each element and returns a map where each group key is associated wit ``` kotlin + fun main(args: Array<String>) { //sampleStart if (true) { diff --git a/core/testdata/format/website-samples/sampleWithAsserts.md b/core/testdata/format/website-samples/sampleWithAsserts.md index 98d7df33..c114468a 100644 --- a/core/testdata/format/website-samples/sampleWithAsserts.md +++ b/core/testdata/format/website-samples/sampleWithAsserts.md @@ -12,6 +12,7 @@ layout: api ``` kotlin + fun main(args: Array<String>) { //sampleStart println(a()) // Hello, Work |