Closed ianlotinsky closed 9 years ago
Correct. haml isn't ruby so it doesn't even try. I'd be open to a plugin system that allowed it to do the haml->ruby conversion first. Look at flay for an example of how that could work. It has an erb plugin.
Thanks for being open to this option. It doesn't look like HAML has a simple conversion method like ERB.src
. Would you be open to a patch for a plugin that would strip HAML syntax and then process the Ruby that remains?
No, because that won't necessarily be valid.
Last time I looked, Haml::Engine.new(haml).precompiled
would work. If that's changed, there's got to be some other equivalent. It's necessary for haml to do its thing.
Ah, good find. I personally avoid HAML so I'm not as familiar with it.
On Mar 17, 2015, at 8:36 PM, Ryan Davis notifications@github.com wrote:
No, because that won't necessarily be valid.
Last time I looked, Haml::Engine.new(haml).precompiled would work. If that's changed, there's got to be some other equivalent. It's necessary for haml to do its thing.
— Reply to this email directly or view it on GitHub.
I'm releasing debride 1.2.0 now. It includes a plugin system that allows for multiple file types to be processed by debride. I'll be releasing debride-erb shortly thereafter. It should be trivial to copy that and add haml support.
Awesome. I'm looking forward to it and would be happy to author the HAML plugin.
Ruby in HAML templates are not recognized. For example,
some_method
would not be recognized insome_template.html.haml
: