mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 05:43:39 +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>"));
|
|
});
|