jade
Version:
Jade template engine
37 lines (30 loc) • 872 B
HTML
<html>
<head>
<script src="../runtime.js"></script>
<script>
window.onload = function(){
function template(locals, attrs, escape, rethrow) {
var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow;
var __ = { lineno: 1, input: "p Hello #{name}", filename: "testing/test.js" };
try {
var buf = [];
with (locals || {}) {
var interp;
__.lineno = 1;
__.lineno = 1;
buf.push('\n<p>Hello ' + escape((interp = name) == null ? '' : interp) + '');
__.lineno = undefined;
buf.push('\n</p>');
}
return buf.join("");
} catch (err) {
rethrow(err, __.input, __.filename, __.lineno);
}
}
console.log(template({ name: 'tj' }));
}
</script>
</head>
<body>
</body>
</html>