lua-haml
lua-haml copied to clipboard
Weird nesting issue
This is just bizarre. I have this Haml:
.foo
%label
%input
Blah
Text
It's rendered, incorrectly, with "Text" not being inside the .foo div.
But, this (should be equivalent) Haml is rendered totally correctly:
.foo
%label
%input Blah
Text
Ran into this again today. Same thing happens if a tag is inside the input:
.modal
.modal-body
.input-append
%input
%span.add-on
.modal-footer
results in .modal-footer being a sibling of .modal instead of .modal-body. This only seems to affect input tags too for some weird reason. Doing this fixes it:
.modal
.modal-body
.input-append
%input
%span.add-on
.modal-footer
Also, mis-indenting .modal-footer will work:
.modal
.modal-body
.input-append
%input
%span.add-on
.modal-footer
This results in .modal-footer as a sibling of .modal, even though the Haml says otherwise. It's like inputs with stuff in them just eat a layer of indentation.