fix for https://github.com/haml/haml/issues/486 - indentation issue on comments #3

Merged
merged 3 commits into from Jun 13, 2012

2 participants

@snatchev
Haml member

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:

https://github.com/haml/html2haml/blob/master/lib/html2haml/html/erb.rb#L62-64

This lead to a haml:block getting opened after the comment.

@snatchev
Haml member

diregard this pull request. I missed a commit.

@snatchev snatchev closed this Jun 12, 2012
@snatchev snatchev reopened this Jun 12, 2012
@snatchev
Haml member

Apparently I don't know how pull requests worked. My commit was added! Sorry for the noise.

@norman norman merged commit fe26b97 into haml:master Jun 13, 2012
@norman
Haml member

No worries. Thanks!

@norman
Haml member

@snatchev Actually it looks like this broke some tests - could you have a look?

http://travis-ci.org/#!/haml/html2haml/builds/1606984

@snatchev
Haml member

Those were testing for the bug fix, so it looks like my missing commit actually broke them.

Pull request sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment