Re:I Heart SASS, But HAML, I'm Just Not That In To You
by bherms on Wednesday May 04, 2011 @03:59PM
(#2515069)
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.
[ Parent
| on HN ]
Re:I Heart SASS, But HAML, I'm Just Not That In To You
by bradly on Wednesday May 04, 2011 @04:47PM
(#2515242)
The 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.
Re:I Heart SASS, But HAML, I'm Just Not That In To You
by drdaeman on Wednesday May 04, 2011 @06:20PM
(#2515515)
I believe the most elegant solution is still
:markdown
Hello, **World**!
Re:I Heart SASS, But HAML, I'm Just Not That In To You
by Confusion on Thursday May 05, 2011 @12:45AM
(#2516212)
That 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.