Eh, we probably couldn't just "run it through" erb every time. That
could have some terrible consequences with both security and
performance. We'd have to compound our processing with the equal
amount of processing for erb.

Also, I don't want it parsing an output. What if a user generated bit
had a <% `rm -rf \*` %> ont it? Also, what about the order of
execution? I mean, if I do...

<%= @start %>
- @start = "hello"
= @start
- @start = "boo"

and you might get

boo
hello

as your output, because erb might be run after. Or, if it was before,
you might have side-effects where the <% is run first and can modify
things in a different order than the Haml interpreting. And, if you
did them at the same time, then ERB would be *slow*. You'd have to
have it "start-up" the render engine for every line! Which, is NOT
what we want.

If anything, I would have Haml precompile the <%= blah %> into the
buffer as a "marked" section of needing printing.

So, user-data is not parsed for <%= %>. And, it would only happen
once... at precompile. And it would only happen on some lines.

Heck, maybe we'd even use a marker.

== Hello <%= momma %>

Or do.

== Hello #{momma}

Yeah, actually, I kind of like that last one. Its kind of odd and not
*everyone* would use it. However, it would be good to have in the
Haml-toolkit. That would be *SUPER* easy to implement. Simply treat it
like a

= "Hello #{momma}"

Thoughts?

-hampton.

On 2/8/07, Jeffrey Hardy <[EMAIL PROTECTED]> wrote:
>
> On 8-Feb-07, at 1:45 PM, Hampton wrote:
> > Well, we *COULD* do the erb syntax.
> >
> > #tag
> >   fix the <%= thing.name %> boyyyeeee!
>
> I'm thinking the erb syntax is a good idea. Its function is obvious,
> which I like. (Everybody knows how erb works). Erb also has the
> advantage of being easier to implement; since you can just run the
> pre-compiled template through erb, there's no need to write your own
> parser.
>
> /Jeff
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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