> Is it possible to dynamically add in a custom filter that would allow
> me to get that :noautoindent functionality?
>
> Bob.
Here's what I came up with:
module Haml
module Filters
class OneLine
def initialize(text)
@text = text
end
def render
Haml::Engine.new(@text).render().gsub(/^\s+/, "").gsub(/[\r\n]
+/, "")
end
end
end
end
Only problem: I'm passing an execution context into the Haml engine,
and I don't have a reference to it within the filter, which means that
my execution context has changed anytime I use the filter. Any idea
how I can access the execution context from within that filter?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---