You can use jades escape method and replace the linebreaks in the return value of that like so:
p !{escape(foo).replace(/
/g, '<br/>')}
I am not aware of any built-in functionality for your use case.
Looks like pug got rid of the escape function, so this is what you would have to use now:
p !{foo.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/
/g, '<br/>')}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…