StringWriter().use {
val templateContext = templateContextFactory.createTemplateContext()
templateContext["link"] = linkedElement.link
- loadedImageTemplate.render(templateContext, it)
- it
+ it.also { loadedImageTemplate.render(templateContext, it) }
}.toString()
private fun renderHtmlPage(linkedElement: LinkedElement) =
StringWriter().use {
val templateContext = templateContextFactory.createTemplateContext()
templateContext["link"] = linkedElement.link
- notLoadedImageTemplate.render(templateContext, it)
- it
+ it.also { notLoadedImageTemplate.render(templateContext, it) }
}.toString()
}