I think I have fixed the cause of this bug haml/haml#486.
What has happening was that erubis was stripping out the content of comments <%# some comment %> and passing "\n" to ERB#add_stmt. Haml's add_stmt would then perform all 3 appending operations:
<%# some comment %>
This lead to a haml:block getting opened after the comment.
move the erb tests into their own class
bug fix for indentation issue on commented lines.
removed the redundant check for code content
diregard this pull request. I missed a commit.
Apparently I don't know how pull requests worked. My commit was added! Sorry for the noise.
No worries. Thanks!
@snatchev Actually it looks like this broke some tests - could you have a look?
Those were testing for the bug fix, so it looks like my missing commit actually broke them.
Pull request sent.