Hats.

3 views
Skip to first unread message

Chris Wanstrath

unread,
Mar 29, 2010, 11:31:23 PM3/29/10
to musta...@googlegroups.com
Experimental support for inverted sections just landed:

http://github.com/defunkt/mustache/compare/hats

In particular, check out the example[1]:

Hello {{name}}
You have just won ${{value}}!

{{#in_ca}}
Well, ${{taxed_value}}, after taxes.
{{/in_ca}}

{{^in_ca}}
You're lucky - in CA you'd be taxed like crazy!
{{/in_ca}}

This can be used to simulate "else"-like behavior, or negation. It
maps closely to how we're using Mustache at GitHub and I hope you like
it - it definitely feels Mustachey to me.

Chris

[1]: http://github.com/defunkt/mustache/blob/hats/examples/simple.mustache

Juvenn Woo

unread,
Mar 29, 2010, 11:33:44 PM3/29/10
to musta...@googlegroups.com
That's a nice idea, Chris!

Regards,
--
Juvenn Woo ♫




To unsubscribe from this group, send email to mustache-rb+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Reply all
Reply to author
Forward
0 new messages