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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -