aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2022-04-29 15:03:08 +0300
committerGitHub <noreply@github.com>2022-04-29 15:03:08 +0300
commit8c218ff4dd5f970233c43845c19299fc74256389 (patch)
treeb6818183ce8faa2c58d6571ca1c86aa28d4f0431 /plugins/base/src/main/kotlin/renderers
parent84aacad29982240ae367b21e9d283d38dab672ae (diff)
downloaddokka-8c218ff4dd5f970233c43845c19299fc74256389.tar.gz
dokka-8c218ff4dd5f970233c43845c19299fc74256389.tar.bz2
dokka-8c218ff4dd5f970233c43845c19299fc74256389.zip
Enable warnings as errors and fix all warnings (#2451)
* Enable warnings as errors and fix all warnings * Enable skip-metadata-version-check compiler setting
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt22
1 files changed, 8 insertions, 14 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index 05559469..7ce41866 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -367,8 +367,6 @@ open class HtmlRenderer(
pageContext: ContentPage
) = // 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")
@@ -377,17 +375,16 @@ open class HtmlRenderer(
private fun FlowContent.buildRow(
node: ContentGroup,
pageContext: ContentPage,
- sourceSetRestriction: Set<DisplaySourceSet>?,
- style: Set<Style>
+ sourceSetRestriction: Set<DisplaySourceSet>?
) {
node.children
.filter { sourceSetRestriction == null || it.sourceSets.any { s -> s in sourceSetRestriction } }
.takeIf { it.isNotEmpty() }
?.let {
when (pageContext) {
- is MultimoduleRootPage -> buildRowForMultiModule(node, it, pageContext, sourceSetRestriction, style)
- is ModulePage -> buildRowForModule(node, it, pageContext, sourceSetRestriction, style)
- else -> buildRowForContent(node, it, pageContext, sourceSetRestriction, style)
+ is MultimoduleRootPage -> buildRowForMultiModule(node, it, pageContext, sourceSetRestriction)
+ is ModulePage -> buildRowForModule(node, it, pageContext, sourceSetRestriction)
+ else -> buildRowForContent(node, it, pageContext, sourceSetRestriction)
}
}
}
@@ -396,8 +393,7 @@ open class HtmlRenderer(
contextNode: ContentGroup,
toRender: List<ContentNode>,
pageContext: ContentPage,
- sourceSetRestriction: Set<DisplaySourceSet>?,
- style: Set<Style>
+ sourceSetRestriction: Set<DisplaySourceSet>?
) {
buildAnchor(contextNode)
div(classes = "table-row") {
@@ -414,8 +410,7 @@ open class HtmlRenderer(
contextNode: ContentGroup,
toRender: List<ContentNode>,
pageContext: ContentPage,
- sourceSetRestriction: Set<DisplaySourceSet>?,
- style: Set<Style>
+ sourceSetRestriction: Set<DisplaySourceSet>?
) {
buildAnchor(contextNode)
div(classes = "table-row") {
@@ -440,8 +435,7 @@ open class HtmlRenderer(
contextNode: ContentGroup,
toRender: List<ContentNode>,
pageContext: ContentPage,
- sourceSetRestriction: Set<DisplaySourceSet>?,
- style: Set<Style>
+ sourceSetRestriction: Set<DisplaySourceSet>?
) {
buildAnchor(contextNode)
div(classes = "table-row") {
@@ -551,7 +545,7 @@ open class HtmlRenderer(
else -> div(classes = "table") {
node.extra.extraHtmlAttributes().forEach { attributes[it.extraKey] = it.extraValue }
node.children.forEach {
- buildRow(it, pageContext, sourceSetRestriction, node.style)
+ buildRow(it, pageContext, sourceSetRestriction)
}
}
}