DEV: Update TextLib imports (#452)

This commit is contained in:
David Taylor 2023-10-10 22:47:38 +01:00 committed by GitHub
parent e4d1e22a10
commit 67b8a8c791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
import I18n from "I18n";
import TextLib from "discourse/lib/text";
import { cookAsync } from "discourse/lib/text";
import Group from "discourse/models/group";
import ModalFunctionality from "discourse/mixins/modal-functionality";
import Controller from "@ember/controller";
@ -238,7 +238,7 @@ export default Controller.extend(ModalFunctionality, {
edit_reason: I18n.t("discourse_post_event.destroy_event"),
};
return TextLib.cookAsync(newRaw).then((cooked) => {
return cookAsync(newRaw).then((cooked) => {
props.cooked = cooked.string;
return post
.save(props)
@ -293,7 +293,7 @@ export default Controller.extend(ModalFunctionality, {
edit_reason: I18n.t("discourse_post_event.edit_reason"),
};
return TextLib.cookAsync(newRaw).then((cooked) => {
return cookAsync(newRaw).then((cooked) => {
props.cooked = cooked.string;
return post
.save(props)

View File

@ -1,5 +1,5 @@
import I18n from "I18n";
import TextLib, { emojiUnescape } from "discourse/lib/text";
import { cookAsync, emojiUnescape } from "discourse/lib/text";
import { exportEntity } from "discourse/lib/export-csv";
import cleanTitle from "../lib/clean-title";
import { dasherize } from "@ember/string";
@ -79,7 +79,7 @@ export default createWidget("discourse-post-event", {
edit_reason: I18n.t("discourse_post_event.edit_reason"),
};
return TextLib.cookAsync(newRaw).then((cooked) => {
return cookAsync(newRaw).then((cooked) => {
props.cooked = cooked.string;
return post.save(props);
});