haml two spaces issue
问题 When using haml I have following problem. First I want to check one variable and after that render something else, but it still should be nested. Let me explain code: .a .b gives: <div class=a><div class=b></div></div> When I use haml if else, I can't nest .b inside .a: - if id == 3 .a{style => 'xxx'} - else .a{style => 'yyy'} .b <-- 2 spaces, otherwise it fails. but 2 spaces are causing the following issue: The problem is, because there is no end in haml, I don't know how to put .b within .a