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

Failed to ignore revisions in .git-blame-ignore-revs.

5 lines
200 B
JavaScript
Raw Normal View History

2018-06-15 23:03:24 +08:00
import { htmlHelper } from "discourse-common/lib/helpers";
import { escapeExpression } from "discourse/lib/utilities";
export default htmlHelper(str => escapeExpression(str).replace(/\n/g, "<br>"));