kemalcr / kemal

Fast, Effective, Simple Web Framework

Home Page:https://kemalcr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rendering HTML with layout file double renders the inner content

matthewmcgarvey opened this issue · comments

macro render(filename, layout)
__content_filename__ = {{filename}}
io = IO::Memory.new
content = ECR.embed {{filename}}, io
ECR.embed {{layout}}, io
io.to_s
end

io should not have been passed to the rendering of content so it gets added before the layout and then within the layout

Related to #629