node.js - Node JS Dust wont render new line -
i have file config.js contains key - value pairs of text. file inserted html key. example:
somekey : 'this text'
this dust helper inserts text html:
dust.helpers.translate = function(chunk, context, bodies, params) { chunk = config[params.key]; return chunk; };
i want able insert new line not working. example:
somekey: 'this \ntext'
any ideas?
you can either set config flag stop dust suppressing whitespace:
dust.config.whitespace = true
or, can insert newline pragma in template: {~n}
since using helper , inserting raw text, want first one.
Comments
Post a Comment