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
so that you're aware.. if you're pulling this information.. say from an SQL database where you've already manually entered in line breaks (say in a textarea of a form) you can do the following on the server to your output
var contentParse = function(content){
content = content.replace(/\n?\r\n/g, '
' );
return content;
};
and then in jade use
!{content}
the ! lets jade know that you're inserting raw html into the variable you're trying to render out
source: https://github.com/visionmedia/jade#tag-text