JSFiddle - React, Tailwind, and code Playground
by Deepak Anand
HTML
/<%=([\s\S]+?)%>/g;
JavaScript
/* var compiled = _.template('hello <%= user %>!');
compiled({
'user': 'fred'
}); */
// => 'hello fred!'
/* compiled = _.template("- <%= Name %> input of type <%= Type %> node is not supported! \n")
var result = compiled({
"Name": "foo",
"Type": "bar",
});
console.log(result) */
_.templateSettings.interpolate = /\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g
compiled = _.template("- ${0} input of type ${1} node is not supported! \n")
var result = compiled(["foo", "bar"]);
console.log(result)