Closed mickeyckm closed 10 years ago
app.requestBeforeRoute = function requestBeforeRoute(server) { require('dustjs-linkedin').optimizers.format = function(ctx, node) { return node }; };
Good solution.
@kurdin nailed it. This is how it's documented on the dust site, although I agree that it's a bit obscure. I'm closing this out, but am curious, what is the benefit of keeping the whitespace intact? Are you using <pre />
elements to format text?
Would it be possible to set whitespace options of a particular route? I tried putting @kurdin 's code in server.use('/api'...) but it seems that all pages now retain their whitespaces.
Hi,
How can I keep the whitespaces in the template after the rendering by dustjs? Is there a settings for me to do that easily?
Cheers, Mickey