aboutsummaryrefslogtreecommitdiff
path: root/plugins/gfm/src/main/kotlin
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-07-12 09:58:38 +0200
committerGitHub <noreply@github.com>2021-07-12 09:58:38 +0200
commitcc6b2991df60f43607c8271d9657be89b3463a69 (patch)
treec705aa2808224a6b80de270ac65d61936e93f253 /plugins/gfm/src/main/kotlin
parent4548d1d929950c794b81cdad648bd2e0fd13a4e1 (diff)
downloaddokka-cc6b2991df60f43607c8271d9657be89b3463a69.tar.gz
dokka-cc6b2991df60f43607c8271d9657be89b3463a69.tar.bz2
dokka-cc6b2991df60f43607c8271d9657be89b3463a69.zip
Handle NBSP and other html entries (#2005)
Diffstat (limited to 'plugins/gfm/src/main/kotlin')
-rw-r--r--plugins/gfm/src/main/kotlin/org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer.kt4
1 files changed, 3 insertions, 1 deletions
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)