Reputation: 447
How can I output pretty HTML using Swig in Express? I have tried the following:
app.set('view options', { pretty: true });
app.locals.pretty = true;
My view code looks like this:
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'swig');
app.engine('.swig', swig.renderFile);
Upvotes: 0
Views: 228
Reputation: 145
Try with swig Filter. example: {{character|safe}} you can get more here http://paularmstrong.github.io/swig/docs/filters/
Upvotes: 1