We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yield
First of all, thanks for Haml6!
After upgrading Haml from 5.x to 6.x, Haml doesn't render properly yielded content.
Repro:
layout.haml
!!! XML !!! %html %body .container = yield
partial.haml
.content partial
render.rb
require 'haml' require 'tilt' layout = Tilt.new('layout.haml') partial = Tilt.new('partial.haml') p layout.render { partial.render }
With Haml5:
"<!DOCTYPE html>\n<html>\n<body>\n<div class='container'>\n<div class='content'>\npartial\n</div>\n\n</div>\n</body>\n</html>\n"
With Haml6:
"<!DOCTYPE html>\n<html>\n<body>\n<div class='container'>\n<div class='content'>\npartial\n</div>\n\n</div>\n</body>\n</html>\n"
Is this a problem with Haml? Or is my code wrong?
The text was updated successfully, but these errors were encountered:
I think you want to do != yield
!= yield
Sorry, something went wrong.
It works! Thanks for your help!
fix: Compatibility with Haml6
5d4be31
Use `!=` not to sanitize HTML. https://haml.info/docs/yardoc/file.REFERENCE.html#unescaping_html refs: haml/haml#1094 refs: sinatra/sinatra#1820 (comment)
No branches or pull requests
First of all, thanks for Haml6!
After upgrading Haml from 5.x to 6.x, Haml doesn't render properly yielded content.
Repro:
layout.haml
partial.haml
.content partial
render.rb
With Haml5:
With Haml6:
Is this a problem with Haml? Or is my code wrong?
The text was updated successfully, but these errors were encountered: