You could probably redefine Haml::Buffer#push_script to do that. - Nathan
On 4/25/07, Russell Norris <[EMAIL PROTECTED]> wrote: > > Other than resorting to the :redcloth filter, is there any way to > automatically have my strings automatically sent through a helper? Here's > what I'm talking about... > > [helper] > def red(string) > SuperRedCloth.new (string).to_html.sub /^<p>(.*)<\/p>$/, '\1' # Get rid > of that wrapping P element. > end > > [view] > %h2 Index Page > %p= red "Welcome to [EMAIL PROTECTED] Don't worry if this page doesn't look > like you imagined your site looking. It'll soon be customized to meet your > needs but for now we're going to use it as a chalkboard where you'll be able > to see just how fast and easily you'll be able to update and edit your > site." > %p= red "If you've looked around the Oyster interface, you've noticed > those first four menu items: entries, pages, categories, and tags. Let's > look at each of them a little closer." > > I'd like to not have to put in that "red" call every time. Very undry but > the outputted HTML looks better than using the filter :redcloth which seems > to indent a little oddly here. Not a huge problem at all just curious if > there's a DRYer way than the one I'm doing. > > RSL > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
