I don't think suppress_output is the way you want to go. I might look at 
push_script and push_silent, as well as render_tag. However, the Haml 
code isn't as modular as it could be (something I'm hoping to address 
for 2.0), so working out attributes and stuff like that might be a 
challenge. The best way might be to preprocess the Haml file, 
transforming "= ..." to "<%= ... %>" and "{:foo => bar}" to "'<%= :foo 
%>' => '<%= bar %>'" and then letting Haml just run as normal.

However, the first thing to try is running htmlguy2hamlite ;-).

- Nathan

Brad Wilson wrote:
> Hi,
>
> I like Haml. Unfortunately my html guy here at work is not such a fan. I 
> noticed that the haml package has an html2haml program and started doing 
> some work on haml2rhtml. By redefining 'push_script' and 'push_silent' 
> (and a few others) I've got a fair bit working. On my 50 or so haml 
> templates here at work I can convert about 30 of them to rhtml with no 
> change in appearance.
>
> It's not very nice that the tool fails that much though, so I'm just 
> kind of putting this out there before I spend too much more time working 
> on it. I want to make sure I'm not missing something terribly obvious.
>
> So I guess #1 question is is there already a way to do automatically 
> convert haml -> rhtml?
>
> I've looked at the 'suppress_output' option and that can be kind of 
> helpful, is there an easy way that I can use that to help me out? Hmm. 
> Maybe I could suppress the output, but take a note of where the ruby 
> code is and squeeze it back in once the rest of the template is done.
>
> Thanks,
> Brad
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to