5 ms·
I disagree... I love them both. Everyone knows HAML has a weakness - inline markup - but it's meant more for templates than anything. I typically make my temp
by bherms 15y ago
I disagree... I love them both. Everyone knows HAML has a weakness - inline markup - but it's meant more for templates than anything. I typically make my templates with HAML and use erb for the more advanced views. That being said, I rarely ever need to resort to erb.
- bradly 15y agoThe reason Haml has the reputation of being weak at inline markup is because people want to do: %p Hello, %strong World ! When what Haml recommends is: %p Hello, <strong>World</strong>! If it seems like you are fighting Haml, check the docs and the mailing list. There is a good chance there is another way to solve the problem.
- drdaeman 15y agoI believe the most elegant solution is still :markdown Hello, **World**!
- Confusion 15y agoThat is not the reason why it has the reputation of being weak at inline markup: this is the exact reason why people consider it to be weak at inline markup: it doesn't support inline markup at all. However, I fail to see why that's a problem. HAML is an abstraction that explicitly acknowledged it is leaky. It just doesn't support inline markup; you'll have to fallback to html to get, just like you have to fallback to assembler from C or JNI from Java to be able to do certain things. I say that's a good thing. Draw a clear line.