aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-09-03 10:24:44 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-09-07 08:07:10 +0200
commit495c64c64db5d7ebc44a7262e5bdeb7cc3a54f9c (patch)
tree41cad978990b52f84906e1effb87d472ce2c784c /plugins/base/src/main
parent581d064dc1fba01fd27f560e158df48498c7e776 (diff)
downloaddokka-495c64c64db5d7ebc44a7262e5bdeb7cc3a54f9c.tar.gz
dokka-495c64c64db5d7ebc44a7262e5bdeb7cc3a54f9c.tar.bz2
dokka-495c64c64db5d7ebc44a7262e5bdeb7cc3a54f9c.zip
Test images in GFM
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index e10672a6..ddcbc7e9 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -346,15 +346,14 @@ open class HtmlRenderer(
override fun FlowContent.buildResource(
node: ContentEmbeddedResource,
pageContext: ContentPage
- ) { // TODO: extension point there
- return if (node.isImage()) {
+ ) = // TODO: extension point there
+ if (node.isImage()) {
//TODO: add imgAttrs parsing
val imgAttrs = node.extra.allOfType<SimpleAttr>().joinAttr()
img(src = node.address, alt = node.altText)
} else {
println("Unrecognized resource type: $node")
}
- }
private fun FlowContent.buildRow(
node: ContentGroup,
@@ -393,9 +392,9 @@ open class HtmlRenderer(
}
it.filter { it !is ContentLink }.takeIf { it.isNotEmpty() }?.let {
- if(pageContext is ModulePage || pageContext is MultimoduleRootPage){
+ if (pageContext is ModulePage || pageContext is MultimoduleRootPage) {
it.forEach {
- span(classes = if(it.dci.kind == ContentKind.Comment) "brief-comment" else "") {
+ span(classes = if (it.dci.kind == ContentKind.Comment) "brief-comment" else "") {
it.build(this, pageContext, sourceSetRestriction)
}
}
@@ -522,7 +521,7 @@ open class HtmlRenderer(
override fun FlowContent.buildNavigation(page: PageNode) =
div(classes = "breadcrumbs") {
val path = locationProvider.ancestors(page).filterNot { it is RendererSpecificPage }.asReversed()
- if(path.isNotEmpty()){
+ if (path.isNotEmpty()) {
buildNavigationElement(path.first(), page)
path.drop(1).forEach { node ->
text("/")
@@ -691,7 +690,7 @@ open class HtmlRenderer(
div {
id = "logo"
}
- if(page !is MultimoduleRootPage) {
+ if (page !is MultimoduleRootPage) {
div {
id = "paneSearch"
}