aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-05-16 20:44:28 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-05-18 16:02:54 +0300
commit4f4b86b873b7676979d3258030fdfc382e22a06b (patch)
treea727921e4a63277513a108d2263e4604eacb09a1 /core/src/main
parentf7f3eff54af925b307e3dbbf8eb8d731a0ba30b9 (diff)
downloaddokka-4f4b86b873b7676979d3258030fdfc382e22a06b.tar.gz
dokka-4f4b86b873b7676979d3258030fdfc382e22a06b.tar.bz2
dokka-4f4b86b873b7676979d3258030fdfc382e22a06b.zip
Fix invalid line breaks in table cells for markdown formats
#KT-16234 fixed
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/Formats/MarkdownFormatService.kt6
1 files changed, 5 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())
+ }
}
}