diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/kotlin/Formats/MarkdownFormatService.kt | 6 | ||||
-rw-r--r-- | core/src/test/kotlin/format/MarkdownFormatTest.kt | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Formats/MarkdownFormatService.kt b/core/src/main/kotlin/Formats/MarkdownFormatService.kt index f7c17401..a7c18a28 100644 --- a/core/src/main/kotlin/Formats/MarkdownFormatService.kt +++ b/core/src/main/kotlin/Formats/MarkdownFormatService.kt @@ -87,7 +87,11 @@ open class MarkdownOutputBuilder(to: StringBuilder, maxBackticksInCodeBlock = maxBackticksInCodeBlock.coerceAtLeast(longestBackTickRun) } else { - to.append(text.htmlEscape()) + if (text == "\n" && inTableCell) { + to.append(" ") + } else { + to.append(text.htmlEscape()) + } } } diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt index 52a62656..e3f4bae7 100644 --- a/core/src/test/kotlin/format/MarkdownFormatTest.kt +++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt @@ -364,6 +364,10 @@ class MarkdownFormatTest { verifyMarkdownNode("nestedLists") } + @Test fun newlineInTableCell() { + verifyMarkdownPackage("newlineInTableCell") + } + private fun buildMultiplePlatforms(path: String): DocumentationModule { val module = DocumentationModule("test") val options = DocumentationOptions("", "html", generateIndexPages = false, noStdlibLink = true) |