Skip to content

Commit

Permalink
DEV: Update TextLib imports (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq authored Oct 10, 2023
1 parent e4d1e22 commit 67b8a8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions assets/javascripts/discourse/widgets/discourse-post-event.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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);
});
Expand Down

0 comments on commit 67b8a8c

Please sign in to comment.