I\'m pretty sure that this is a no-brainer but I didn\'t find any snippet of sample code. What\'s the best way to insert line breaks (aka the good ol\' br/)?
As far
I was able to do the following after @haxxxton
app.use(function(req, res, next){
var contentParse = function (content){
content = content.replace(/\n?\r\n/g, '
' );
return content;
};
res.locals.contentParse = contentParse;
next();
});
For example, it can be used in a jade template using the function p!= contentParse(post.description)