diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 0dd3b34b..74bc6fea 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -88,7 +88,7 @@ open class HtmlRenderer( val imageExtensions = setOf("png", "jpg", "jpeg", "gif", "bmp", "tif", "webp", "svg") return if (File(node.address).extension.toLowerCase() in imageExtensions) { //TODO: add imgAttrs parsing - val imgAttrs = node.extras.filterIsInstance<HTMLSimpleAttr>().joinAttr() + val imgAttrs = node.extra.allOfType<SimpleAttr>().joinAttr() img(src = node.address, alt = node.altText) } else { println("Unrecognized resource type: $node") @@ -239,7 +239,7 @@ open class HtmlRenderer( } } -fun List<HTMLMetadata>.joinAttr() = joinToString(" ") { it.key + "=" + it.value } +fun List<SimpleAttr>.joinAttr() = joinToString(" ") { it.extraKey + "=" + it.extraValue } private fun PageNode.pageKind() = when (this) { is PackagePageNode -> "package" |