mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 10:16:19 +08:00
4 lines
157 B
JavaScript
4 lines
157 B
JavaScript
Em.Handlebars.helper('preserve-newlines', str => {
|
|
return new Handlebars.SafeString(Discourse.Utilities.escapeExpression(str).replace(/\n/g, "<br>"));
|
|
});
|