From cc6b2991df60f43607c8271d9657be89b3463a69 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Mon, 12 Jul 2021 09:58:38 +0200 Subject: Handle NBSP and other html entries (#2005) --- .../kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/gfm/src') diff --git a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt b/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt index f18c7093..36e461a9 100644 --- a/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt +++ b/plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt @@ -208,7 +208,9 @@ open class CommonmarkRenderer( } override fun StringBuilder.buildText(textNode: ContentText) { - if (textNode.text.isNotBlank()) { + if (textNode.extra[HtmlContent] != null) { + append(textNode.text) + } else if (textNode.text.isNotBlank()) { val decorators = decorators(textNode.style) append(textNode.text.takeWhile { it == ' ' }) append(decorators) -- cgit