4 ms·
Haml is great for many cases, but it's terrible when the ratio of text to embedded code gets large. Chris Eppstein, one of the developers of Haml, made a blog p
by mhartl 15y ago
Haml is great for many cases, but it's terrible when the ratio of text to embedded code gets large. Chris Eppstein, one of the developers of Haml, made a blog post to this effect last year:
http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-for-content/ http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-f...
As a result, though I love Haml, I think ERb is a more sensible default.
- erikpukinskis 15y agoI feel like if you've got lots of text and embedded code mixed together in a template there's probably something wrong with your architecture. For the few cases where that makes sense, ERb is great. But I have a hard time imagining it's common enough to make it the default. Edit: Also, the post you linked to outlines several simple ways to mix text into your HAML (inlining HTML, using markdown filters, etc)
- bonzoesc 15y agoI think ERB ends up kind of ugly for prose too; adding rdiscount as a dependency and using the markdown filter in Haml is usually how I do it.
- mhartl 15y agoSounds like a good solution. I'll have to try that out.
- chriseppstein 15y agoFull Disclosure: I am not a haml developer. I'm a haml user -- I only develop on sass.
- mhartl 15y agoOops, by bad.