pixsy/node_modules/pug/test/output/code.conditionals.js

47 lines
1.2 KiB
JavaScript
Raw Normal View History

2017-12-22 17:22:08 +00:00
function template(locals) {
var pug_html = "", pug_mixins = {}, pug_interp;
if (true) {
pug_html = pug_html + "<p>foo</p>";
} else {
pug_html = pug_html + "<p>bar</p>";
}
if (true) {
{
pug_html = pug_html + "<p>foo</p>";
}
} else {
{
pug_html = pug_html + "<p>bar</p>";
}
}
if (true) {
pug_html = pug_html + "<p>foo</p><p>bar</p><p>baz</p>";
} else {
pug_html = pug_html + "<p>bar</p>";
}
if (!true) {
pug_html = pug_html + "<p>foo</p>";
} else {
pug_html = pug_html + "<p>bar</p>";
}
if ("nested") {
if ("works") {
pug_html = pug_html + "<p>yay</p>";
}
}
if (false) {} else {
pug_html = pug_html + '<div class="bar"></div>';
}
if (true) {
pug_html = pug_html + '<div class="bar"></div>';
}
pug_html = pug_html + '<div class="bing"></div>';
if (false) {
pug_html = pug_html + '<div class="bing"></div>';
} else if (false) {
pug_html = pug_html + '<div class="bar"></div>';
} else {
pug_html = pug_html + '<div class="foo"></div>';
}
return pug_html;
}