From 2ceff9c41cff42b7fb3ffe75ea36a7c570f3615b Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Fri, 17 Feb 2017 17:40:32 +0300 Subject: Fix for GH-136 GH-137 Blank lines inside code blocks are not preserved --- core/src/test/kotlin/format/HtmlFormatTest.kt | 4 ++++ core/src/test/kotlin/format/MarkdownFormatTest.kt | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'core/src/test/kotlin/format') diff --git a/core/src/test/kotlin/format/HtmlFormatTest.kt b/core/src/test/kotlin/format/HtmlFormatTest.kt index 4b4eff59..f2b8624d 100644 --- a/core/src/test/kotlin/format/HtmlFormatTest.kt +++ b/core/src/test/kotlin/format/HtmlFormatTest.kt @@ -138,6 +138,10 @@ class HtmlFormatTest { verifyHtmlNode("functionalTypeWithNamedParameters") } + @Test fun blankLineInsideCodeBlock() { + verifyHtmlNode("blankLineInsideCodeBlock") + } + private fun verifyHtmlNode(fileName: String, withKotlinRuntime: Boolean = false) { verifyHtmlNodes(fileName, withKotlinRuntime) { model -> model.members.single().members } } diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt index f870d898..d788c84d 100644 --- a/core/src/test/kotlin/format/MarkdownFormatTest.kt +++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt @@ -241,6 +241,10 @@ class MarkdownFormatTest { verifyMarkdownPackage("suspendParam") } + @Test fun blankLineInsideCodeBlock() { + verifyMarkdownNode("blankLineInsideCodeBlock") + } + private fun verifyMarkdownPackage(fileName: String, withKotlinRuntime: Boolean = false) { verifyOutput("testdata/format/$fileName.kt", ".package.md", withKotlinRuntime = withKotlinRuntime) { model, output -> markdownService.createOutputBuilder(output, tempLocation).appendNodes(model.members) -- cgit