discourse/app/assets/javascripts/admin/helpers/preserve-newlines.js.es6

4 lines
153 B
Plaintext
Raw Normal View History

import { htmlHelper } from 'discourse/lib/helpers';
export default htmlHelper(str => Discourse.Utilities.escapeExpression(str).replace(/\n/g, "<br>"));