diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-07-12 09:58:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-12 09:58:38 +0200 |
commit | cc6b2991df60f43607c8271d9657be89b3463a69 (patch) | |
tree | c705aa2808224a6b80de270ac65d61936e93f253 /plugins/gfm/src/main/kotlin | |
parent | 4548d1d929950c794b81cdad648bd2e0fd13a4e1 (diff) | |
download | dokka-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.kt | 4 |
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) |