JSFiddle - React, Tailwind, and code Playground
by Eric Howe
HTML
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script id="t" type="text/x-underscore">
{% _(a).each(function(x) { %}
{%= x %} - {%- x %}<br>
{% }) %}
</script>
JavaScript
_.templateSettings = {
interpolate: /\{%=(.+?)%\}/g,
escape: /\{%-(.+?)%\}/g,
evaluate: /\{%(.+?)%\}/g
};
var t = _.template($('#t').html());
$('body').append(t({
a: [
'<b>where</b>',
'<i>is</i>',
'<tt>pancakes</tt>',
'house?'
]
}));