kemalcr / kemal

Fast, Effective, Simple Web Framework

Home Page:https://kemalcr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

content with layout seems duplicated

rdp opened this issue · comments

Using

  kemal:
    git: https://github.com/kemalcr/kemal.git
    version: 1.1.0+git.commit.5e2efec0503622267b57d03fe7d5151000d3bf47

If you have a layout view with a content block, it ends up duplicating the entire thing and showing a bit of corruption in the middle.

The expansion from my test app seemed to show something like this:

~> __content_filename__ = "views/page_null.ecr"
   io = IO::Memory.new
   content = (io << "this is nothinggg "
   io << "\n"
   )
   io << "<html>\n<head>\n  <title>My Kemal Application</title>\n</head>\n<body>\n  "
   (content).to_s(io)
   io << "\n</body>\n</html>\n"
   io.to_s

content seems to be assigned to io, then you have content.to_s(io) so duplicates...
Thank you.

This is now fixed in 1.1.2 👍