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

5 lines
193 B
JavaScript

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