aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers/html
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-03-11 13:05:14 +0100
committerBłażej Kardyś <bkardys@virtuslab.com>2020-03-11 13:10:16 +0100
commit5636115aee8d13870f0d3f172667fca1b3f78276 (patch)
treea7b3621bf88ee298887e57dcbcd039f5df1f34cd /plugins/base/src/main/kotlin/renderers/html
parent11b223daa2c54d2b86efb5e6054fd7205ed0b37a (diff)
downloaddokka-5636115aee8d13870f0d3f172667fca1b3f78276.tar.gz
dokka-5636115aee8d13870f0d3f172667fca1b3f78276.tar.bz2
dokka-5636115aee8d13870f0d3f172667fca1b3f78276.zip
Classlike header and other ui fixes
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index aaa9c0a4..390730a3 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -172,10 +172,16 @@ open class HtmlRenderer(
language: String,
pageContext: ContentPage
) {
- buildNewLine()
- code.forEach {
- +((it as? ContentText)?.text ?: run { context.logger.error("Cannot cast $it as ContentText!"); "" })
- buildNewLine()
+ span(classes = "code") {
+ val iterator = code.iterator()
+ while (iterator.hasNext()) {
+ val element = iterator.next()
+ +((element as? ContentText)?.text
+ ?: run { context.logger.error("Cannot cast $element as ContentText!"); "" })
+ if (iterator.hasNext()) {
+ buildNewLine()
+ }
+ }
}
}